diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-12-02 12:35:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-12-02 12:35:29 +0300 |
commit | f8d5883a5bcc7be575b1b9a2ca3ef0bfee9360d5 (patch) | |
tree | d10f15b35d22638dd586abe67bc2362dea4386c6 /source/blender | |
parent | 6780c0b12a63ac1395d97f199e25c4f692244efb (diff) |
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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index b8727a53d8a..5f9a5b195c0 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1015,8 +1015,8 @@ PyTypeObject pyrna_prop_Type = { 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 @@ PyObject *BPY_rna_module( void ) 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; |