python.cooked

Helper functions to interact with the Python C API

Members

Functions

createModule
auto createModule()

Creates a Python3 module from the given C functions. Each function has the same name in Python.

pyMethodDef
auto pyMethodDef(F cfunction)

Helper function to create PyMethodDef structs. The strings are compile-time parameters to avoid passing GC-allocated memory to Python (by calling std.string.toStringz or manually appending the null terminator).

Manifest constants

defaultMethodFlags
enum defaultMethodFlags;
Undocumented in source.

Meta