diff options
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_ui.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_ui.c b/source/blender/python/intern/bpy_ui.c index 1c15fc34547..bbfb04719d8 100644 --- a/source/blender/python/intern/bpy_ui.c +++ b/source/blender/python/intern/bpy_ui.c @@ -387,7 +387,7 @@ PyObject *BPY_ui_module( void ) #if PY_VERSION_HEX >= 0x03000000 submodule= PyModule_Create(&ui_module); #else /* Py2.x */ - submodule= Py_InitModule3( "bpyui", ui_methods, "" ); + submodule= Py_InitModule3( "bpy.ui", ui_methods, "" ); #endif /* uiBlock->flag (controls) */ @@ -558,8 +558,10 @@ PyObject *BPY_ui_module( void ) PyModule_AddObject( mod, "TIME", PyLong_FromSsize_t(SPACE_TIME) ); PyModule_AddObject( mod, "NODE", PyLong_FromSsize_t(SPACE_NODE) ); - - + /* 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); return submodule; } |