These macros declare and define ModuleDefinition objects that represent Python modules.
They create the fundamental module object that serves as the container for all exported functions, classes, and constants.
Macros | |
| #define | PY_DECLARE_MODULE_NAME_DOC(i_module, s_name, s_doc) |
| Declare and define a ModuleDefinition object representing a Python module. | |
| #define | PY_DECLARE_MODULE_NAME(i_module, s_name) |
| Declare a module with name only (no documentation). | |
| #define | PY_DECLARE_MODULE_DOC(i_module, s_doc) |
| Declare a module with documentation, using the identifier as the module name. | |
| #define | PY_DECLARE_MODULE(i_module) |
| Declare a module with minimal setup (name derived from identifier, no documentation). | |
| #define PY_DECLARE_MODULE_NAME_DOC | ( | i_module, | |
| s_name, | |||
| s_doc ) |
Declare and define a ModuleDefinition object representing a Python module.
Creates a ModuleDefinition instance that can be used to build a Python module with the specified name and documentation.
| i_module | Unscoped identifier of the module, used as C++ variable name |
| s_name | Python module name (const char* string, will be copied) |
| s_doc | module docstring (const char* string, will be copied), or nullptr |
Definition at line 196 of file pyobject_macros.h.
| #define PY_DECLARE_MODULE_NAME | ( | i_module, | |
| s_name ) |
Declare a module with name only (no documentation).
Wraps PY_DECLARE_MODULE_NAME_DOC() with s_doc = nullptr.
| i_module | Unscoped identifier of the module, used as C++ variable name |
| s_name | Python module name (const char* string, will be copied) |
Definition at line 212 of file pyobject_macros.h.
| #define PY_DECLARE_MODULE_DOC | ( | i_module, | |
| s_doc ) |
Declare a module with documentation, using the identifier as the module name.
Wraps PY_DECLARE_MODULE_NAME_DOC() with s_name derived from i_module.
| i_module | Unscoped identifier of the module, used as C++ variable and Python module name |
| s_doc | Module documentation string (const char* string, will be copied), or nullptr |
Definition at line 228 of file pyobject_macros.h.
| #define PY_DECLARE_MODULE | ( | i_module | ) |
Declare a module with minimal setup (name derived from identifier, no documentation).
Wraps PY_DECLARE_MODULE_NAME_DOC() with defaults.
| i_module | Unscoped identifier of the module, used as C++ variable and Python module name |
Definition at line 243 of file pyobject_macros.h.