diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-12 07:58:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-12 08:13:36 +0300 |
commit | a5c44265a3368020bc9524696dae94caa9419e2c (patch) | |
tree | 6c3143de333163ba75f277d685ac87933e7baf2d /source/blender/python/intern/bpy_rna.c | |
parent | 2a5f22c1afc9d143f3e1c784a0139e0d990d5a4a (diff) |
Cleanup: remove workaround for MSVC PyTypeObject declarations
This is no longer needed for MSVC-2017.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 7a43c9cb997..fab73d0f3dc 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -7078,13 +7078,9 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { NULL, /* ternaryfunc tp_call; */ NULL, /* reprfunc tp_str; */ -/* will only use these if this is a subtype of a py class */ -# if defined(_MSC_VER) - NULL, /* defer assignment */ -# else + /* will only use these if this is a subtype of a py class */ PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */ -# endif - NULL, /* setattrofunc tp_setattro; */ + NULL, /* setattrofunc tp_setattro; */ /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ @@ -7110,13 +7106,9 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { # else 0, # endif -/*** Added in release 2.2 ***/ -/* Iterators */ -# if defined(_MSC_VER) - NULL, /* defer assignment */ -# else - PyObject_SelfIter, /* getiterfunc tp_iter; */ -# endif + /*** Added in release 2.2 ***/ + /* Iterators */ + PyObject_SelfIter, /* getiterfunc tp_iter; */ (iternextfunc)pyrna_prop_collection_iter_next, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ @@ -7640,9 +7632,6 @@ void BPY_rna_init(void) /* For some reason MSVC complains of these. */ #if defined(_MSC_VER) 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 /* metaclass */ |