[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20454] branches/blender2.5/blender/source /blender/python/intern/bpy_ui.c: patch from Andrea Weikert, added some comments.

Campbell Barton ideasman42 at gmail.com
Wed May 27 17:41:44 CEST 2009


Revision: 20454
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20454
Author:   campbellbarton
Date:     2009-05-27 17:41:44 +0200 (Wed, 27 May 2009)

Log Message:
-----------
patch from Andrea Weikert, added some comments.
thanks for looking into this.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/python/intern/bpy_ui.c

Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_ui.c
===================================================================
--- branches/blender2.5/blender/source/blender/python/intern/bpy_ui.c	2009-05-27 14:23:06 UTC (rev 20453)
+++ branches/blender2.5/blender/source/blender/python/intern/bpy_ui.c	2009-05-27 15:41:44 UTC (rev 20454)
@@ -387,7 +387,7 @@
 #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,9 +558,11 @@
 	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;
 }
 





More information about the Bf-blender-cvs mailing list