Skip to content

Commit 2ead63b

Browse files
committedSep 10, 2024·
Explicitly pass in compile unit objects to initModule.
1 parent 05442f8 commit 2ead63b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎pythonBuffer.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ namespace classdesc
726726
}
727727
};
728728

729-
inline void initModule()
729+
inline void initModule(PyObject* pythonModule, RESTProcess_t& registry)
730730
{
731731
assert(pythonModule);
732732
for (auto& i: registry)
@@ -771,7 +771,7 @@ namespace classdesc_access
771771
static PyModuleDef module_##name = { \
772772
PyModuleDef_HEAD_INIT, \
773773
#name, \
774-
"Python interface to C++ code", \
774+
"Python interface to C++ code: "#name, \
775775
-1, \
776776
nullptr, \
777777
nullptr, \
@@ -783,7 +783,7 @@ namespace classdesc_access
783783
using namespace classdesc; \
784784
registries()[#name]=&registry; \
785785
pythonModule=PyModule_Create(&module_##name); \
786-
if (pythonModule) initModule(); \
786+
if (pythonModule) initModule(pythonModule,registry); \
787787
return pythonModule; \
788788
}
789789

0 commit comments

Comments
 (0)
Please sign in to comment.