diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-12 00:08:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-12 00:08:15 +0300 |
commit | d21f44546951a29cea5524fcd2147e08de996c7d (patch) | |
tree | c34d1c61efe627fe30053eefd2085b32f0127b49 /source/blender/python/generic | |
parent | 7952ed872acceafbfec9e161b48f16059cf31804 (diff) |
PyAPI: remove Python 3.7x compatibility code
This removes Python version checks needed to build with 3.8+ and 3.7x.
Ref D10381
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 24 | ||||
-rw-r--r-- | source/blender/python/generic/imbuf_py_api.c | 14 |
2 files changed, 11 insertions, 27 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index fd996c8a1a2..daa604a3fbf 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1192,12 +1192,8 @@ PyTypeObject BPy_IDGroup_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall_offset */ -#else - (printfunc)NULL, /* printfunc tp_print */ -#endif + NULL, /* destructor tp_dealloc; */ + 0, /* tp_vectorcall_offset */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ @@ -1605,12 +1601,8 @@ PyTypeObject BPy_IDArray_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall_offset */ -#else - (printfunc)NULL, /* printfunc tp_print */ -#endif + NULL, /* destructor tp_dealloc; */ + 0, /* tp_vectorcall_offset */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ @@ -1726,12 +1718,8 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall_offset */ -#else - (printfunc)NULL, /* printfunc tp_print */ -#endif + NULL, /* destructor tp_dealloc; */ + 0, /* tp_vectorcall_offset */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c index 24029f0ca12..d05690759ce 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -347,15 +347,11 @@ PyTypeObject Py_ImBuf_Type = { /* Methods to implement standard operations */ (destructor)py_imbuf_dealloc, /* destructor tp_dealloc; */ -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall_offset */ -#else - (printfunc)NULL, /* printfunc tp_print */ -#endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* cmpfunc tp_compare; */ - (reprfunc)py_imbuf_repr, /* reprfunc tp_repr; */ + 0, /* tp_vectorcall_offset */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* cmpfunc tp_compare; */ + (reprfunc)py_imbuf_repr, /* reprfunc tp_repr; */ /* Method suites for standard classes */ |