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:
@@ -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,
|
||||
|
@@ -1198,7 +1198,11 @@ PyTypeObject BPy_IDGroup_Type = {
|
||||
/* Methods to implement standard operations */
|
||||
|
||||
NULL, /* destructor 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, /* cmpfunc tp_compare; */
|
||||
@@ -1607,7 +1611,11 @@ PyTypeObject BPy_IDArray_Type = {
|
||||
/* Methods to implement standard operations */
|
||||
|
||||
NULL, /* destructor 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, /* cmpfunc tp_compare; */
|
||||
@@ -1724,7 +1732,11 @@ PyTypeObject BPy_IDGroup_Iter_Type = {
|
||||
/* Methods to implement standard operations */
|
||||
|
||||
NULL, /* destructor 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, /* cmpfunc tp_compare; */
|
||||
|
@@ -342,7 +342,11 @@ PyTypeObject Py_ImBuf_Type = {
|
||||
/* Methods to implement standard operations */
|
||||
|
||||
(destructor)py_imbuf_dealloc, /* destructor 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, /* cmpfunc tp_compare; */
|
||||
|
@@ -795,7 +795,11 @@ static PyTypeObject BlenderAppTranslationsType = {
|
||||
/* methods */
|
||||
/* No destructor, this is a singleton! */
|
||||
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,
|
||||
|
@@ -92,7 +92,11 @@ static PyTypeObject bpy_lib_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)bpy_lib_dealloc, /* 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,
|
||||
|
@@ -6404,7 +6404,11 @@ PyTypeObject pyrna_struct_meta_idprop_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,
|
||||
@@ -6485,7 +6489,11 @@ PyTypeObject pyrna_struct_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)pyrna_struct_dealloc, /* 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,
|
||||
@@ -6574,7 +6582,11 @@ PyTypeObject pyrna_prop_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)pyrna_prop_dealloc, /* 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,
|
||||
@@ -6658,7 +6670,11 @@ PyTypeObject pyrna_prop_array_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)pyrna_prop_array_dealloc, /* 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,
|
||||
@@ -6741,7 +6757,11 @@ PyTypeObject pyrna_prop_collection_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)pyrna_prop_dealloc, /* 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,
|
||||
@@ -6827,7 +6847,11 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)pyrna_prop_dealloc, /* 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,
|
||||
@@ -6913,7 +6937,11 @@ PyTypeObject pyrna_func_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,
|
||||
@@ -7009,7 +7037,11 @@ static PyTypeObject pyrna_prop_collection_iter_Type = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)pyrna_prop_collection_iter_dealloc, /* 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,
|
||||
|
@@ -3042,7 +3042,11 @@ PyTypeObject vector_Type = {
|
||||
/* Methods to implement standard operations */
|
||||
|
||||
(destructor)BaseMathObject_dealloc, /* destructor 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, /* cmpfunc tp_compare; */
|
||||
|
Reference in New Issue
Block a user