use PyImport_ExtendInittab for py module initialization rather then adding to sys.modules directly, no functional change.
This commit is contained in:
@@ -313,14 +313,8 @@ static struct PyModuleDef bpy_ops_module = {
|
||||
PyObject *BPY_operator_module(void)
|
||||
{
|
||||
PyObject *submodule;
|
||||
|
||||
submodule= PyModule_Create(&bpy_ops_module);
|
||||
PyDict_SetItemString(PyImport_GetModuleDict(), bpy_ops_module.m_name, submodule);
|
||||
|
||||
/* INCREF since its its assumed that all these functions return the
|
||||
* module with a new ref like PyDict_New, since they are passed to
|
||||
* PyModule_AddObject which steals a ref */
|
||||
Py_INCREF(submodule);
|
||||
submodule= PyModule_Create(&bpy_ops_module);
|
||||
|
||||
return submodule;
|
||||
}
|
||||
|
Reference in New Issue
Block a user