From ced06081b8ef2c9cefd0ed61461c54d5393ca23d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 29 Oct 2010 22:59:39 +0000 Subject: use PyImport_ExtendInittab for py module initialization rather then adding to sys.modules directly, no functional change. --- source/blender/python/intern/bpy_operator.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/blender/python/intern/bpy_operator.c') diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index 3ffa78dab70..1cf99218bf6 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -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; } -- cgit v1.2.3