Cleanup: remove workaround for MSVC PyTypeObject declarations
This is no longer needed for MSVC-2017.
This commit is contained in:
@@ -118,8 +118,8 @@ static PyTypeObject bpy_lib_Type = {
|
|||||||
NULL, /* reprfunc tp_str; */
|
NULL, /* reprfunc tp_str; */
|
||||||
|
|
||||||
/* will only use these if this is a subtype of a py class */
|
/* will only use these if this is a subtype of a py class */
|
||||||
NULL /*PyObject_GenericGetAttr is assigned later */, /* getattrofunc tp_getattro; */
|
PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
|
||||||
NULL, /* setattrofunc tp_setattro; */
|
NULL, /* setattrofunc tp_setattro; */
|
||||||
|
|
||||||
/* Functions to access object as input/output buffer */
|
/* Functions to access object as input/output buffer */
|
||||||
NULL, /* PyBufferProcs *tp_as_buffer; */
|
NULL, /* PyBufferProcs *tp_as_buffer; */
|
||||||
@@ -498,10 +498,6 @@ PyMethodDef BPY_library_load_method_def = {
|
|||||||
|
|
||||||
int BPY_library_load_type_ready(void)
|
int BPY_library_load_type_ready(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* some compilers don't like accessing this directly, delay assignment */
|
|
||||||
bpy_lib_Type.tp_getattro = PyObject_GenericGetAttr;
|
|
||||||
|
|
||||||
if (PyType_Ready(&bpy_lib_Type) < 0) {
|
if (PyType_Ready(&bpy_lib_Type) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7078,13 +7078,9 @@ static PyTypeObject pyrna_prop_collection_iter_Type = {
|
|||||||
NULL, /* ternaryfunc tp_call; */
|
NULL, /* ternaryfunc tp_call; */
|
||||||
NULL, /* reprfunc tp_str; */
|
NULL, /* reprfunc tp_str; */
|
||||||
|
|
||||||
/* will only use these if this is a subtype of a py class */
|
/* will only use these if this is a subtype of a py class */
|
||||||
# if defined(_MSC_VER)
|
|
||||||
NULL, /* defer assignment */
|
|
||||||
# else
|
|
||||||
PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
|
PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
|
||||||
# endif
|
NULL, /* setattrofunc tp_setattro; */
|
||||||
NULL, /* setattrofunc tp_setattro; */
|
|
||||||
|
|
||||||
/* Functions to access object as input/output buffer */
|
/* Functions to access object as input/output buffer */
|
||||||
NULL, /* PyBufferProcs *tp_as_buffer; */
|
NULL, /* PyBufferProcs *tp_as_buffer; */
|
||||||
@@ -7110,13 +7106,9 @@ static PyTypeObject pyrna_prop_collection_iter_Type = {
|
|||||||
# else
|
# else
|
||||||
0,
|
0,
|
||||||
# endif
|
# endif
|
||||||
/*** Added in release 2.2 ***/
|
/*** Added in release 2.2 ***/
|
||||||
/* Iterators */
|
/* Iterators */
|
||||||
# if defined(_MSC_VER)
|
PyObject_SelfIter, /* getiterfunc tp_iter; */
|
||||||
NULL, /* defer assignment */
|
|
||||||
# else
|
|
||||||
PyObject_SelfIter, /* getiterfunc tp_iter; */
|
|
||||||
# endif
|
|
||||||
(iternextfunc)pyrna_prop_collection_iter_next, /* iternextfunc tp_iternext; */
|
(iternextfunc)pyrna_prop_collection_iter_next, /* iternextfunc tp_iternext; */
|
||||||
|
|
||||||
/*** Attribute descriptor and subclassing stuff ***/
|
/*** Attribute descriptor and subclassing stuff ***/
|
||||||
@@ -7640,9 +7632,6 @@ void BPY_rna_init(void)
|
|||||||
/* For some reason MSVC complains of these. */
|
/* For some reason MSVC complains of these. */
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
pyrna_struct_meta_idprop_Type.tp_base = &PyType_Type;
|
pyrna_struct_meta_idprop_Type.tp_base = &PyType_Type;
|
||||||
|
|
||||||
pyrna_prop_collection_iter_Type.tp_iter = PyObject_SelfIter;
|
|
||||||
pyrna_prop_collection_iter_Type.tp_getattro = PyObject_GenericGetAttr;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* metaclass */
|
/* metaclass */
|
||||||
|
|||||||
@@ -100,8 +100,8 @@ static PyTypeObject bpy_rna_data_context_Type = {
|
|||||||
NULL, /* reprfunc tp_str; */
|
NULL, /* reprfunc tp_str; */
|
||||||
|
|
||||||
/* will only use these if this is a subtype of a py class */
|
/* will only use these if this is a subtype of a py class */
|
||||||
NULL /*PyObject_GenericGetAttr is assigned later */, /* getattrofunc tp_getattro; */
|
NULL, /* getattrofunc tp_getattro; */
|
||||||
NULL, /* setattrofunc tp_setattro; */
|
NULL, /* setattrofunc tp_setattro; */
|
||||||
|
|
||||||
/* Functions to access object as input/output buffer */
|
/* Functions to access object as input/output buffer */
|
||||||
NULL, /* PyBufferProcs *tp_as_buffer; */
|
NULL, /* PyBufferProcs *tp_as_buffer; */
|
||||||
|
|||||||
Reference in New Issue
Block a user