Cleanup: use preprocessor version check for PyTypeObject declaration

While `tp_print` was deprecated, Python 3.8+ uses this for
'tp_vectorcall_offset' which wasn't stated in the comment from
efd71aad4f.

Instead of suppressing clang-tidy, use preprocessor a check since
this properly represents the difference between Python versions.
This commit is contained in:
2020-11-11 08:36:54 +11:00
parent 86bdd2acc6
commit cd9acfed4f
156 changed files with 825 additions and 463 deletions

View File

@@ -167,7 +167,11 @@ static PyTypeObject bmesh_op_Type = {
0, /* tp_itemsize */
/* methods */
NULL, /* tp_dealloc */
(printfunc)NULL, /* printfunc tp_print; */
#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,