diff options
Diffstat (limited to 'source/blender/python/intern/bpy_rna_data.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_data.c | 126 |
1 files changed, 49 insertions, 77 deletions
diff --git a/source/blender/python/intern/bpy_rna_data.c b/source/blender/python/intern/bpy_rna_data.c index 3c7ec3bddc3..2dc0b8dc999 100644 --- a/source/blender/python/intern/bpy_rna_data.c +++ b/source/blender/python/intern/bpy_rna_data.c @@ -60,84 +60,56 @@ static void bpy_rna_data_context_dealloc(BPy_DataContext *self) Py_CLEAR(self->data_rna); PyObject_GC_Del(self); } - static PyTypeObject bpy_rna_data_context_Type = { - PyVarObject_HEAD_INIT(NULL, 0) "bpy_rna_data_context", /* tp_name */ - sizeof(BPy_DataContext), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)bpy_rna_data_context_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, - /* tp_compare */ /* DEPRECATED in python 3.0! */ - NULL, /* tp_repr */ - - /* Method suites for standard classes */ - - NULL, /* PyNumberMethods *tp_as_number; */ - NULL, /* PySequenceMethods *tp_as_sequence; */ - NULL, /* PyMappingMethods *tp_as_mapping; */ - - /* More standard operations (here for binary compatibility) */ - - NULL, /* hashfunc tp_hash; */ - NULL, /* ternaryfunc tp_call; */ - NULL, /* reprfunc tp_str; */ - - /* Will only use these if this is a sub-type of a Python class. */ - NULL, /* getattrofunc tp_getattro; */ - NULL, /* setattrofunc tp_setattro; */ - - /* Functions to access object as input/output buffer */ - NULL, /* PyBufferProcs *tp_as_buffer; */ - - /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* long tp_flags; */ - - NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ - /* call function for all accessible objects */ - (traverseproc)bpy_rna_data_context_traverse, /* traverseproc tp_traverse; */ - - /* delete references to contained objects */ - (inquiry)bpy_rna_data_context_clear, /* inquiry tp_clear; */ - - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons (subclassed) ***/ - NULL, /* richcmpfunc tp_richcompare; */ - - /*** weak reference enabler ***/ - 0, - /*** Added in release 2.2 ***/ - /* Iterators */ - NULL, /* getiterfunc tp_iter; */ - NULL, /* iternextfunc tp_iternext; */ - - /*** Attribute descriptor and subclassing stuff ***/ - bpy_rna_data_context_methods, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ - /* Low-level free-memory routine */ - NULL, /* freefunc tp_free; */ - /* For PyObject_IS_GC */ - NULL, /* inquiry tp_is_gc; */ - NULL, /* PyObject *tp_bases; */ - /* method resolution order */ - NULL, /* PyObject *tp_mro; */ - NULL, /* PyObject *tp_cache; */ - NULL, /* PyObject *tp_subclasses; */ - NULL, /* PyObject *tp_weaklist; */ - NULL, + PyVarObject_HEAD_INIT(NULL, 0) + /*tp_name*/ "bpy_rna_data_context", + /*tp_basicsize*/ sizeof(BPy_DataContext), + /*tp_itemsize*/ 0, + /*tp_dealloc*/ (destructor)bpy_rna_data_context_dealloc, + /*tp_vectorcall_offset*/ 0, + /*tp_getattr*/ NULL, + /*tp_setattr*/ NULL, + /*tp_as_async*/ NULL, + /*tp_repr*/ NULL, + /*tp_as_number*/ NULL, + /*tp_as_sequence*/ NULL, + /*tp_as_mapping*/ NULL, + /*tp_hash*/ NULL, + /*tp_call*/ NULL, + /*tp_str*/ NULL, + /*tp_getattro*/ NULL, + /*tp_setattro*/ NULL, + /*tp_as_buffer*/ NULL, + /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + /*tp_doc*/ NULL, + /*tp_traverse*/ (traverseproc)bpy_rna_data_context_traverse, + /*tp_clear*/ (inquiry)bpy_rna_data_context_clear, + /*tp_richcompare*/ NULL, + /*tp_weaklistoffset*/ 0, + /*tp_iter*/ NULL, + /*tp_iternext*/ NULL, + /*tp_methods*/ bpy_rna_data_context_methods, + /*tp_members*/ NULL, + /*tp_getset*/ NULL, + /*tp_base*/ NULL, + /*tp_dict*/ NULL, + /*tp_descr_get*/ NULL, + /*tp_descr_set*/ NULL, + /*tp_dictoffset*/ 0, + /*tp_init*/ NULL, + /*tp_alloc*/ NULL, + /*tp_new*/ NULL, + /*tp_free*/ NULL, + /*tp_is_gc*/ NULL, + /*tp_bases*/ NULL, + /*tp_mro*/ NULL, + /*tp_cache*/ NULL, + /*tp_subclasses*/ NULL, + /*tp_weaklist*/ NULL, + /*tp_del*/ NULL, + /*tp_version_tag*/ 0, + /*tp_finalize*/ NULL, + /*tp_vectorcall*/ NULL, }; PyDoc_STRVAR(bpy_rna_data_context_load_doc, |