[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17675] branches/blender2.5/blender/source /blender/python/intern/bpy_rna.c: mingw was giving errors...

Campbell Barton ideasman42 at gmail.com
Tue Dec 2 10:35:31 CET 2008


Revision: 17675
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17675
Author:   campbellbarton
Date:     2008-12-02 10:35:29 +0100 (Tue, 02 Dec 2008)

Log Message:
-----------
mingw was giving errors...
source\blender\python\intern\bpy_rna.c:1018: error: initializer element is not constant
source\blender\python\intern\bpy_rna.c:1018: error: (near initialization for `pyrna_prop_Type.tp_get

Assign get generic get/sets before PyType_Ready runs

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

Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c	2008-12-02 01:05:23 UTC (rev 17674)
+++ branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c	2008-12-02 09:35:29 UTC (rev 17675)
@@ -1015,8 +1015,8 @@
 	NULL,						/* hashfunc tp_hash; */
 	NULL,                       /* ternaryfunc tp_call; */
 	NULL,                       /* reprfunc tp_str; */
-	PyObject_GenericGetAttr,	/* getattrofunc tp_getattro; */ /* will only use these if this is a subtype of a py class */
-	PyObject_GenericSetAttr,	/* setattrofunc tp_setattro; */
+	NULL, /*PyObject_GenericGetAttr - MINGW Complains, assign later */	/* getattrofunc tp_getattro; */ /* will only use these if this is a subtype of a py class */
+	NULL, /*PyObject_GenericSetAttr - MINGW Complains, assign later */	/* setattrofunc tp_setattro; */
 
 	/* Functions to access object as input/output buffer */
 	NULL,                       /* PyBufferProcs *tp_as_buffer; */
@@ -1113,6 +1113,10 @@
 	if( PyType_Ready( &pyrna_struct_Type ) < 0 )
 		return NULL;
 	
+	/* This can't be set in the pytype struct because some compilers complain */
+	pyrna_prop_Type.tp_getattro = PyObject_GenericGetAttr; 
+	pyrna_prop_Type.tp_setattro = PyObject_GenericSetAttr; 
+	
 	if( PyType_Ready( &pyrna_prop_Type ) < 0 )
 		return NULL;
 	





More information about the Bf-blender-cvs mailing list