align weakref list for rna (properties were using wrong pointer)
This commit is contained in:
@@ -72,40 +72,45 @@ extern PyTypeObject pyrna_prop_collection_Type;
|
|||||||
#define PYRNA_STRUCT_IS_VALID(pysrna) (((BPy_StructRNA *)(pysrna))->ptr.type != NULL)
|
#define PYRNA_STRUCT_IS_VALID(pysrna) (((BPy_StructRNA *)(pysrna))->ptr.type != NULL)
|
||||||
#define PYRNA_PROP_IS_VALID(pysrna) (((BPy_PropertyRNA *)(pysrna))->ptr.type != NULL)
|
#define PYRNA_PROP_IS_VALID(pysrna) (((BPy_PropertyRNA *)(pysrna))->ptr.type != NULL)
|
||||||
|
|
||||||
|
/* 'in_weakreflist' MUST be aligned */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_HEAD /* required python macro */
|
PyObject_HEAD /* required python macro */
|
||||||
|
#ifdef USE_WEAKREFS
|
||||||
|
PyObject *in_weakreflist;
|
||||||
|
#endif
|
||||||
PointerRNA ptr;
|
PointerRNA ptr;
|
||||||
} BPy_DummyPointerRNA;
|
} BPy_DummyPointerRNA;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_HEAD /* required python macro */
|
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
|
#ifdef USE_WEAKREFS
|
||||||
PyObject *in_weakreflist;
|
PyObject *in_weakreflist;
|
||||||
#endif
|
#endif
|
||||||
|
PointerRNA ptr;
|
||||||
|
int freeptr; /* needed in some cases if ptr.data is created on the fly, free when deallocing */
|
||||||
} BPy_StructRNA;
|
} BPy_StructRNA;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_HEAD /* required python macro */
|
PyObject_HEAD /* required python macro */
|
||||||
PointerRNA ptr;
|
|
||||||
PropertyRNA *prop;
|
|
||||||
#ifdef USE_WEAKREFS
|
#ifdef USE_WEAKREFS
|
||||||
PyObject *in_weakreflist;
|
PyObject *in_weakreflist;
|
||||||
#endif
|
#endif
|
||||||
|
PointerRNA ptr;
|
||||||
|
PropertyRNA *prop;
|
||||||
} BPy_PropertyRNA;
|
} BPy_PropertyRNA;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_HEAD /* required python macro */
|
PyObject_HEAD /* required python macro */
|
||||||
|
#ifdef USE_WEAKREFS
|
||||||
|
PyObject *in_weakreflist;
|
||||||
|
#endif
|
||||||
PointerRNA ptr;
|
PointerRNA ptr;
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
/* Arystan: this is a hack to allow sub-item r/w access like: face.uv[n][m] */
|
/* 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 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 */
|
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;
|
} BPy_PropertyArrayRNA;
|
||||||
|
|
||||||
/* cheap trick */
|
/* cheap trick */
|
||||||
|
|||||||
Reference in New Issue
Block a user