diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-29 12:38:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-29 12:38:52 +0300 |
commit | ca36e04362d1140fdc61bc052dd7b3dcc81545a0 (patch) | |
tree | 58fe681cacd04c34b54cfd0df15fd44827166e7b /source/blender/python/intern/bpy_rna.h | |
parent | 12616b7e247c721b33aff133f39cad44c96056a8 (diff) |
python3 couldn't generate epydocs because python3 needs richcompare functions for C defined PyTypes (it seems).
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r-- | source/blender/python/intern/bpy_rna.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 73272eac6e8..fc16ad6ea9a 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -33,14 +33,17 @@ extern PyTypeObject pyrna_struct_Type; extern PyTypeObject pyrna_prop_Type; +#define BPy_StructRNA_Check(v) (PyObject_TypeCheck(v, &pyrna_struct_Type)) +#define BPy_PropertyRNA_Check(v) (PyObject_TypeCheck(v, &pyrna_prop_Type)) + typedef struct { - PyObject_VAR_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 */ } BPy_StructRNA; typedef struct { - PyObject_VAR_HEAD /* required python macro */ + PyObject_HEAD /* required python macro */ PointerRNA ptr; PropertyRNA *prop; } BPy_PropertyRNA; |