Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-05-27 19:41:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-27 19:41:44 +0400
commit5936032f661395f18bcc15c3dba73e8b6f5e963b (patch)
treef40b7a14cecc498ec689a57a99fafe085a9229c2 /source/blender/python
parente49c0b495a03735c704d139bbc4f28cd5ae99fe2 (diff)
patch from Andrea Weikert, added some comments.
thanks for looking into this.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_ui.c8
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;
}