Prepwork: marked the spot for adding more types to the Python module

This commit is contained in:
John McCardle 2023-08-21 20:27:47 -04:00
commit 96e78e6150

View file

@ -107,7 +107,21 @@ static PyModuleDef mcrfpyModule = {
// Module initializer fn, passed to PyImport_AppendInittab // Module initializer fn, passed to PyImport_AppendInittab
PyObject* PyInit_mcrfpy() PyObject* PyInit_mcrfpy()
{ {
return PyModule_Create(&mcrfpyModule); PyObject* m = PyModule_Create(&mcrfpyModule);
if (m == NULL) return NULL;
/*
// add C++ classes exposed to Python here
Py_INCREF(&PyUIMenuType);
if (PyModule_AddObject(m, "Menu", (PyObject *) & PyUIMenuType) < 0)
{
Py_DECREF(&PyUIMenuType);
return NULL;
}
*/
return m;
} }
// init_python - configure interpreter details here // init_python - configure interpreter details here