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>2011-03-02 19:22:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-02 19:22:04 +0300
commit0abffe22c20e9fff76bb752a42f8346d925ba01b (patch)
tree1a446999cd7688a1499a7d6d0e0b5fb223dc54cc /source/blender/python/intern/bpy_rna.h
parent44534392543db63a49d65f619bd5995c18e367da (diff)
align weakref list for rna (properties were using wrong pointer)
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r--source/blender/python/intern/bpy_rna.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index 77f1fa3b336..aa8eaf3601a 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -72,40 +72,45 @@ extern PyTypeObject pyrna_prop_collection_Type;
#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 */