[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35303] trunk/blender/source/blender/ python/intern/bpy_rna.h: align weakref list for rna ( properties were using wrong pointer)
Campbell Barton
ideasman42 at gmail.com
Wed Mar 2 17:22:04 CET 2011
Revision: 35303
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35303
Author: campbellbarton
Date: 2011-03-02 16:22:04 +0000 (Wed, 02 Mar 2011)
Log Message:
-----------
align weakref list for rna (properties were using wrong pointer)
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_rna.h
Modified: trunk/blender/source/blender/python/intern/bpy_rna.h
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.h 2011-03-02 14:29:30 UTC (rev 35302)
+++ trunk/blender/source/blender/python/intern/bpy_rna.h 2011-03-02 16:22:04 UTC (rev 35303)
@@ -72,40 +72,45 @@
#define PYRNA_STRUCT_IS_VALID(pysrna) (((BPy_StructRNA *)(pysrna))->ptr.type != NULL)
#define PYRNA_PROP_IS_VALID(pysrna) (((BPy_PropertyRNA *)(pysrna))->ptr.type != NULL)
+/* 'in_weakreflist' MUST be aligned */
+
typedef struct {
PyObject_HEAD /* required python macro */
+#ifdef USE_WEAKREFS
+ PyObject *in_weakreflist;
+#endif
PointerRNA ptr;
} BPy_DummyPointerRNA;
typedef struct {
PyObject_HEAD /* required python macro */
- PointerRNA ptr;
- int freeptr; /* needed in some cases if ptr.data is created on the fly, free when deallocing */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
+ PointerRNA ptr;
+ int freeptr; /* needed in some cases if ptr.data is created on the fly, free when deallocing */
} BPy_StructRNA;
typedef struct {
PyObject_HEAD /* required python macro */
- PointerRNA ptr;
- PropertyRNA *prop;
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
+ PointerRNA ptr;
+ PropertyRNA *prop;
} BPy_PropertyRNA;
typedef struct {
PyObject_HEAD /* required python macro */
+#ifdef USE_WEAKREFS
+ PyObject *in_weakreflist;
+#endif
PointerRNA ptr;
PropertyRNA *prop;
/* Arystan: this is a hack to allow sub-item r/w access like: face.uv[n][m] */
int arraydim; /* array dimension, e.g: 0 for face.uv, 2 for face.uv[n][m], etc. */
int arrayoffset; /* array first item offset, e.g. if face.uv is [4][2], arrayoffset for face.uv[n] is 2n */
-#ifdef USE_WEAKREFS
- PyObject *in_weakreflist;
-#endif
} BPy_PropertyArrayRNA;
/* cheap trick */
More information about the Bf-blender-cvs
mailing list