17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00
Files
maszyna/scripting/PyInt_macros.h
2026-09-09 20:35:26 +02:00

9 lines
360 B
C

#pragma once
// Macros cannot cross a module boundary, so they live in a plain header that
// consumers pull into their global module fragment. The bodies expand at the use
// site, where the imported names are in scope, so this header includes nothing.
#define PyGetFloat(param) PyFloat_FromDouble(param)
#define PyGetBool(param) param ? Py_True : Py_False