Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-11 00:36:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-11 01:11:21 +0300
commitcd9acfed4f7674b84be965d469a367aef96f8af3 (patch)
tree2b0d8785ffe57874576157261eb007d3731b5a35
parent86bdd2acc66c95c3698525ab3d5d6263cc1b825c (diff)
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 efd71aad4f22ec0073d80b8dd296015d3f395aa8. Instead of suppressing clang-tidy, use preprocessor a check since this properly represents the difference between Python versions.
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_MediumType.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewMap.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp8
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops.c6
-rw-r--r--source/blender/python/generic/idprop_py_api.c18
-rw-r--r--source/blender/python/generic/imbuf_py_api.c6
-rw-r--r--source/blender/python/intern/bpy_app_translations.c6
-rw-r--r--source/blender/python/intern/bpy_library_load.c6
-rw-r--r--source/blender/python/intern/bpy_rna.c48
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c6
156 files changed, 825 insertions, 463 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp
index 4e0da4e87cf..d66a74bc83f 100644
--- a/source/blender/freestyle/intern/python/BPy_BBox.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp
@@ -80,9 +80,11 @@ PyTypeObject BBox_Type = {
sizeof(BPy_BBox), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)BBox_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
index 8f4718e774f..2359d79f7d0 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
@@ -153,9 +153,11 @@ PyTypeObject BinaryPredicate0D_Type = {
sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
index 31500186ab4..7d554e0abe1 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
@@ -187,9 +187,11 @@ PyTypeObject BinaryPredicate1D_Type = {
sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
index bb0dbb02049..2aa08ec3ab5 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
@@ -538,9 +538,11 @@ PyTypeObject FrsMaterial_Type = {
sizeof(BPy_FrsMaterial), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)FrsMaterial_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
index ebea140b9b5..943a9ca0e64 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
@@ -330,9 +330,11 @@ PyTypeObject FrsNoise_Type = {
sizeof(BPy_FrsNoise), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)FrsNoise_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index 515f6525648..323e76fe249 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -171,9 +171,11 @@ PyTypeObject Id_Type = {
sizeof(BPy_Id), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Id_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
index 2cceedbbb28..25f3c54ea7d 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -153,9 +153,11 @@ PyTypeObject IntegrationType_Type = {
sizeof(PyLongObject), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
index 5a7d38055f1..3d0c57d5509 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
@@ -313,9 +313,11 @@ PyTypeObject Interface0D_Type = {
sizeof(BPy_Interface0D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Interface0D_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index 8225076397c..8a4a6eb61db 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -341,9 +341,11 @@ PyTypeObject Interface1D_Type = {
sizeof(BPy_Interface1D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Interface1D_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
index 4a6f56f8f8c..bee30aa9e8c 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
@@ -228,9 +228,11 @@ PyTypeObject Iterator_Type = {
sizeof(BPy_Iterator), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Iterator_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
index 1a568913d74..547f46839b8 100644
--- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
@@ -45,9 +45,11 @@ PyTypeObject MediumType_Type = {
sizeof(PyLongObject), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp
index c9e03459126..b0a620803d1 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -107,9 +107,11 @@ PyTypeObject Nature_Type = {
sizeof(PyLongObject), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index a4ee0db7093..5fd02e4a9dd 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -770,9 +770,11 @@ PyTypeObject Operators_Type = {
sizeof(BPy_Operators), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Operators_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp
index b25178de0c9..ed83e76559f 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp
@@ -281,9 +281,11 @@ PyTypeObject SShape_Type = {
sizeof(BPy_SShape), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)SShape_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index 247e78542d5..8f706f56f7d 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -677,9 +677,11 @@ PyTypeObject StrokeAttribute_Type = {
sizeof(BPy_StrokeAttribute), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)StrokeAttribute_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
index 597eccda1f9..b55da256c22 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
@@ -282,9 +282,11 @@ PyTypeObject StrokeShader_Type = {
sizeof(BPy_StrokeShader), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)StrokeShader___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
index 47742e39c5c..78c93ddce31 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
@@ -124,9 +124,11 @@ PyTypeObject UnaryFunction0D_Type = {
sizeof(BPy_UnaryFunction0D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
index 9793f25fc07..365850b748c 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
@@ -118,9 +118,11 @@ PyTypeObject UnaryFunction1D_Type = {
sizeof(BPy_UnaryFunction1D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
index 848ae19b4a4..e3076d4615f 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
@@ -167,9 +167,11 @@ PyTypeObject UnaryPredicate0D_Type = {
sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
index 969226ebd8a..4b5269a1434 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
@@ -225,9 +225,11 @@ PyTypeObject UnaryPredicate1D_Type = {
sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
index 382064ffc7a..8565a95fc1a 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
@@ -184,9 +184,11 @@ PyTypeObject ViewMap_Type = {
sizeof(BPy_ViewMap), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)ViewMap_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
index 84a18c2203e..6c8551867fd 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
@@ -352,9 +352,11 @@ PyTypeObject ViewShape_Type = {
sizeof(BPy_ViewShape), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)ViewShape_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
index 19062cd0048..e284f28cd0b 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
@@ -59,9 +59,11 @@ PyTypeObject FalseBP1D_Type = {
sizeof(BPy_FalseBP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
index 59b25a037dc..2c84f69dd6e 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
@@ -61,9 +61,11 @@ PyTypeObject Length2DBP1D_Type = {
sizeof(BPy_Length2DBP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
index f422e37776f..ab79ae4e209 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
@@ -60,9 +60,11 @@ PyTypeObject SameShapeIdBP1D_Type = {
sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
index a3fe6945b71..47c3c6b53aa 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
@@ -60,9 +60,11 @@ PyTypeObject TrueBP1D_Type = {
sizeof(BPy_TrueBP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
index 9fc66e571a7..9d69b1c902c 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
@@ -90,9 +90,11 @@ PyTypeObject ViewMapGradientNormBP1D_Type = {
sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index a3229667cb7..f70f70275df 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -242,9 +242,11 @@ PyTypeObject CurvePoint_Type = {
sizeof(BPy_CurvePoint), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index e1f9a588e62..b245ecd81f1 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -455,9 +455,11 @@ PyTypeObject SVertex_Type = {
sizeof(BPy_SVertex), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
index e565575dee1..696b3022e85 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
@@ -164,9 +164,11 @@ PyTypeObject ViewVertex_Type = {
sizeof(BPy_ViewVertex), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
index 827dc22231e..5e63e190356 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -361,9 +361,11 @@ PyTypeObject StrokeVertex_Type = {
sizeof(BPy_StrokeVertex), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
index c0b8dfafba8..ed10f3e0af5 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
@@ -109,9 +109,11 @@ PyTypeObject NonTVertex_Type = {
sizeof(BPy_NonTVertex), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
index ec23c8f46fe..596eec7a4e5 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
@@ -219,9 +219,11 @@ PyTypeObject TVertex_Type = {
sizeof(BPy_TVertex), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
index f5c2c91da6c..0438abfd38c 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -358,9 +358,11 @@ PyTypeObject FEdge_Type = {
sizeof(BPy_FEdge), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index 4420ce02ced..d77a8007b1a 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -190,9 +190,11 @@ PyTypeObject FrsCurve_Type = {
sizeof(BPy_FrsCurve), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 49d6896c2da..90cc3e4f1ab 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -501,9 +501,11 @@ PyTypeObject Stroke_Type = {
sizeof(BPy_Stroke), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index a8102add2c1..c416d860c77 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -386,9 +386,11 @@ PyTypeObject ViewEdge_Type = {
sizeof(BPy_ViewEdge), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index 951df52f03a..dcf6c149b7d 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -150,9 +150,11 @@ PyTypeObject Chain_Type = {
sizeof(BPy_Chain), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
index e430edadd5f..454a2bb1c0f 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
@@ -408,9 +408,11 @@ PyTypeObject FEdgeSharp_Type = {
sizeof(BPy_FEdgeSharp), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
index 962dd95b866..c0d56ec949c 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -253,9 +253,11 @@ PyTypeObject FEdgeSmooth_Type = {
sizeof(BPy_FEdgeSmooth), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
index b3bdcabcfb0..9f5f8d07e26 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -186,9 +186,11 @@ PyTypeObject AdjacencyIterator_Type = {
sizeof(BPy_AdjacencyIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
index ef6d2fd8944..e4cd1cd073b 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
@@ -167,9 +167,11 @@ PyTypeObject ChainPredicateIterator_Type = {
sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
index 6f442eb0c10..9aa8984f4af 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
@@ -121,9 +121,11 @@ PyTypeObject ChainSilhouetteIterator_Type = {
sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
index f2a485964a0..f2441fa9d18 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
@@ -255,9 +255,11 @@ PyTypeObject ChainingIterator_Type = {
sizeof(BPy_ChainingIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index e50d60002a9..ff710e931d4 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -135,9 +135,11 @@ PyTypeObject CurvePointIterator_Type = {
sizeof(BPy_CurvePointIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index 557436935d0..d0de53fa424 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -210,9 +210,11 @@ PyTypeObject Interface0DIterator_Type = {
sizeof(BPy_Interface0DIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index 95def64989c..c0db79858b7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -162,9 +162,11 @@ PyTypeObject SVertexIterator_Type = {
sizeof(BPy_SVertexIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index 8549e81a9b8..ceb0d2a7546 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -293,9 +293,11 @@ PyTypeObject StrokeVertexIterator_Type = {
sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index b515d3b9564..e01bbe928ce 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -240,9 +240,11 @@ PyTypeObject ViewEdgeIterator_Type = {
sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index 3cc73820177..735746e33be 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -144,9 +144,11 @@ PyTypeObject orientedViewEdgeIterator_Type = {
sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
index 842981446b9..c3b98d12918 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
@@ -71,9 +71,11 @@ PyTypeObject BackboneStretcherShader_Type = {
sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
index a04d8f4f3e1..50fc9938a87 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
@@ -71,9 +71,11 @@ PyTypeObject BezierCurveShader_Type = {
sizeof(BPy_BezierCurveShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
index 38ecfb64f4f..e1198266a98 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
@@ -91,9 +91,11 @@ PyTypeObject BlenderTextureShader_Type = {
sizeof(BPy_BlenderTextureShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
index db60c5b9db9..e8790df2dd0 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
@@ -89,9 +89,11 @@ PyTypeObject CalligraphicShader_Type = {
sizeof(BPy_CalligraphicShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
index d05c11db5e6..8fb6e26d8d7 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
@@ -70,9 +70,11 @@ PyTypeObject ColorNoiseShader_Type = {
sizeof(BPy_ColorNoiseShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
index 7b13441380f..2b108226e90 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
@@ -76,9 +76,11 @@ PyTypeObject ConstantColorShader_Type = {
sizeof(BPy_ConstantColorShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
index fe00b621d74..0174107f27f 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
@@ -70,9 +70,11 @@ PyTypeObject ConstantThicknessShader_Type = {
sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
index 3a0f02ea9a3..b5c200c17b1 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
@@ -76,9 +76,11 @@ PyTypeObject ConstrainedIncreasingThicknessShader_Type = {
sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
index b266aee1fe8..d1c3219b079 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
@@ -78,9 +78,11 @@ PyTypeObject GuidingLinesShader_Type = {
sizeof(BPy_GuidingLinesShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
index b400c9b5414..7d1efebe71f 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
@@ -98,9 +98,11 @@ PyTypeObject IncreasingColorShader_Type = {
sizeof(BPy_IncreasingColorShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
index 14014dbc394..f13930bd4b3 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
@@ -76,9 +76,11 @@ PyTypeObject IncreasingThicknessShader_Type = {
sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
index 838622ad624..48c63554f06 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
@@ -77,9 +77,11 @@ PyTypeObject PolygonalizationShader_Type = {
sizeof(BPy_PolygonalizationShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
index 27ab73a6b65..5f0a0bfb305 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
@@ -68,9 +68,11 @@ PyTypeObject SamplingShader_Type = {
sizeof(BPy_SamplingShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
index 3545a29f337..3d30fb4e11b 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
@@ -100,9 +100,11 @@ PyTypeObject SmoothingShader_Type = {
sizeof(BPy_SmoothingShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
index 129ad9cb735..876dd5f2f63 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
@@ -94,9 +94,11 @@ PyTypeObject SpatialNoiseShader_Type = {
sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
index 26683a57ea1..bd70d41717b 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
@@ -70,9 +70,11 @@ PyTypeObject StrokeTextureStepShader_Type = {
sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
index 8b02ea4322a..fd7f5fabe77 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
@@ -72,9 +72,11 @@ PyTypeObject ThicknessNoiseShader_Type = {
sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
index b433a75f2e4..ed575b12b8d 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
@@ -69,9 +69,11 @@ PyTypeObject TipRemoverShader_Type = {
sizeof(BPy_TipRemoverShader), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
index 61a6e68c59f..5ce96212031 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
@@ -187,9 +187,11 @@ PyTypeObject UnaryFunction0DDouble_Type = {
sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
index a1304e0f7b2..8c988d55c91 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
@@ -126,9 +126,11 @@ PyTypeObject UnaryFunction0DEdgeNature_Type = {
sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
index 2cef1302d94..25b19e84b60 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
@@ -163,9 +163,11 @@ PyTypeObject UnaryFunction0DFloat_Type = {
sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
index c34c9beded6..b2426cab572 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
@@ -122,9 +122,11 @@ PyTypeObject UnaryFunction0DId_Type = {
sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
index 68170329238..77f89265ba4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
@@ -125,9 +125,11 @@ PyTypeObject UnaryFunction0DMaterial_Type = {
sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
index 7ecb40592a9..52f990502ef 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
@@ -126,9 +126,11 @@ PyTypeObject UnaryFunction0DUnsigned_Type = {
sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
index 2d4e5fe566e..45e1144cd32 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
@@ -131,9 +131,11 @@ PyTypeObject UnaryFunction0DVec2f_Type = {
sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
index 9e591b03703..18eeae86dd7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
@@ -124,9 +124,11 @@ PyTypeObject UnaryFunction0DVec3f_Type = {
sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
index 3a6c6f0117f..28c4425b2a4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
@@ -135,9 +135,11 @@ PyTypeObject UnaryFunction0DVectorViewShape_Type = {
sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
index 1cf47960cdb..75773aaa8d0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
@@ -133,9 +133,11 @@ PyTypeObject UnaryFunction0DViewShape_Type = {
sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
index 379b909e382..b59e72e23d2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
@@ -74,9 +74,11 @@ PyTypeObject ShapeIdF0D_Type = {
sizeof(BPy_ShapeIdF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
index 75c497aa1a7..9f7f2b234f7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
@@ -77,9 +77,11 @@ PyTypeObject MaterialF0D_Type = {
sizeof(BPy_MaterialF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
index 802087438d7..1cd1a4ab8ac 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
@@ -68,9 +68,11 @@ PyTypeObject CurveNatureF0D_Type = {
sizeof(BPy_CurveNatureF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
index c2338510b2f..60cfed83713 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
@@ -70,9 +70,11 @@ PyTypeObject Normal2DF0D_Type = {
sizeof(BPy_Normal2DF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
index a30e3472742..063f1651486 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
@@ -72,9 +72,11 @@ PyTypeObject VertexOrientation2DF0D_Type = {
sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
index f28f8b0dd02..b0188cd0244 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
@@ -72,9 +72,11 @@ PyTypeObject VertexOrientation3DF0D_Type = {
sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
index 91c5eb6d17d..ba890477782 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetOccludeeF0D_Type = {
sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
index e362a6be0d3..531020dc32a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetShapeF0D_Type = {
sizeof(BPy_GetShapeF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
index 2e837d7e601..cb36e388306 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
@@ -72,9 +72,11 @@ PyTypeObject Curvature2DAngleF0D_Type = {
sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
index e4d3f88e261..ca306a55d1e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
@@ -77,9 +77,11 @@ PyTypeObject DensityF0D_Type = {
sizeof(BPy_DensityF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
index 09ae5751e5b..6a688212239 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetProjectedXF0D_Type = {
sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
index b54ea8e3495..8efaaf1b699 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetProjectedYF0D_Type = {
sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
index cb7640c3a15..e13c990685f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetProjectedZF0D_Type = {
sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
index 914af1847f6..43cbb433bdd 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetXF0D_Type = {
sizeof(BPy_GetXF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
index d7c8ca7d9c9..24bfe3be985 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetYF0D_Type = {
sizeof(BPy_GetYF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
index b59929ec87a..84a985a134d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetZF0D_Type = {
sizeof(BPy_GetZF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
index 8643f6f26c7..247473dcb41 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
@@ -75,9 +75,11 @@ PyTypeObject LocalAverageDepthF0D_Type = {
sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
index d5fd9295566..e82b5f1c557 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
@@ -72,9 +72,11 @@ PyTypeObject ZDiscontinuityF0D_Type = {
sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
index 2696a7f4186..b4760d10b2c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
@@ -70,9 +70,11 @@ PyTypeObject GetCurvilinearAbscissaF0D_Type = {
sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
index ba5d7e641e7..d4c735e3572 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
@@ -66,9 +66,11 @@ PyTypeObject GetParameterF0D_Type = {
sizeof(BPy_GetParameterF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
index 9dae36028cb..6d5f1ed80c3 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
@@ -75,9 +75,11 @@ PyTypeObject GetViewMapGradientNormF0D_Type = {
sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
index 3ed7f969de9..bbf2aee5204 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
@@ -73,9 +73,11 @@ PyTypeObject ReadCompleteViewMapPixelF0D_Type = {
sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
index 1507ed30eb1..54401153d37 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
@@ -74,9 +74,11 @@ PyTypeObject ReadMapPixelF0D_Type = {
sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
index 39e84fcade3..88ca0579870 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
@@ -77,9 +77,11 @@ PyTypeObject ReadSteerableViewMapPixelF0D_Type = {
sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
index ae1971bf9b9..d6e00988e68 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
@@ -75,9 +75,11 @@ PyTypeObject QuantitativeInvisibilityF0D_Type = {
sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
index 96390bc8058..ddff11d7916 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
@@ -68,9 +68,11 @@ PyTypeObject GetOccludersF0D_Type = {
sizeof(BPy_GetOccludersF0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
index 75631c0b44f..57b2d61d5c1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
@@ -268,9 +268,11 @@ PyTypeObject UnaryFunction1DDouble_Type = {
sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
index f4a3b1cddf0..a987dbb67f5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
@@ -175,9 +175,11 @@ PyTypeObject UnaryFunction1DEdgeNature_Type = {
sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
index faac4170d4c..66499c68c65 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
@@ -164,9 +164,11 @@ PyTypeObject UnaryFunction1DFloat_Type = {
sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
index f82af0f76a1..54c5c786367 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
@@ -175,9 +175,11 @@ PyTypeObject UnaryFunction1DUnsigned_Type = {
sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
index 4efc7edd00a..8b23163fc95 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
@@ -179,9 +179,11 @@ PyTypeObject UnaryFunction1DVec2f_Type = {
sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
index af8ceb10126..9b6a2445588 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
@@ -172,9 +172,11 @@ PyTypeObject UnaryFunction1DVec3f_Type = {
sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
index 0fd455ca2fe..c95595dc953 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
@@ -200,9 +200,11 @@ PyTypeObject UnaryFunction1DVectorViewShape_Type = {
sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
index 9cf47f7ccd3..b258b0b27f7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
@@ -187,9 +187,11 @@ PyTypeObject UnaryFunction1DVoid_Type = {
sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
index f9118f2d8bd..205820d9a92 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
@@ -80,9 +80,11 @@ PyTypeObject CurveNatureF1D_Type = {
sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
index 0155dff0428..d22a1ec99ef 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject Normal2DF1D_Type = {
sizeof(BPy_Normal2DF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
index 0e3fead3cea..f66bd4c668f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject Orientation2DF1D_Type = {
sizeof(BPy_Orientation2DF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
index f479b9bac37..2f408d45b74 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject Orientation3DF1D_Type = {
sizeof(BPy_Orientation3DF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
index 754265f1614..13455eb3a4c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
@@ -75,9 +75,11 @@ PyTypeObject Curvature2DAngleF1D_Type = {
sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
index 46b73ab6411..fcf2bebc161 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
@@ -88,9 +88,11 @@ PyTypeObject DensityF1D_Type = {
sizeof(BPy_DensityF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
index 67439056723..5c352c670c1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
@@ -92,9 +92,11 @@ PyTypeObject GetCompleteViewMapDensityF1D_Type = {
sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
index 53df6f56911..45c6a1b0fb7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
@@ -99,9 +99,11 @@ PyTypeObject GetDirectionalViewMapDensityF1D_Type = {
sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
index 5f24bc78840..0c7276a13ec 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject GetProjectedXF1D_Type = {
sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
index 6243d07ab4b..1f1c01a5344 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject GetProjectedYF1D_Type = {
sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
index 1800d5a98c6..cfa06f9d8fd 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject GetProjectedZF1D_Type = {
sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
index 2d26001b236..985e10f2b83 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
@@ -89,9 +89,11 @@ PyTypeObject GetSteerableViewMapDensityF1D_Type = {
sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
index 076e67fe171..441ea2f5833 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
@@ -89,9 +89,11 @@ PyTypeObject GetViewMapGradientNormF1D_Type = {
sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
index 13f16d08993..716cfbfe37a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject GetXF1D_Type = {
sizeof(BPy_GetXF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
index 66bba03695d..693c2453db2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
@@ -73,9 +73,11 @@ PyTypeObject GetYF1D_Type = {
sizeof(BPy_GetYF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
index d2366005ed4..e9030625b10 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject GetZF1D_Type = {
sizeof(BPy_GetZF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
index f101bce35b7..4ae2cd054e2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
@@ -84,9 +84,11 @@ PyTypeObject LocalAverageDepthF1D_Type = {
sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
index bed44e430c2..9feb07552ca 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
@@ -78,9 +78,11 @@ PyTypeObject ZDiscontinuityF1D_Type = {
sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
index c82a6df7a34..400b5a95fcf 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
@@ -80,9 +80,11 @@ PyTypeObject QuantitativeInvisibilityF1D_Type = {
sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
index 0c958f29b6f..7637153017f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetOccludeeF1D_Type = {
sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
index 307c74e5547..d532268b294 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetOccludersF1D_Type = {
sizeof(BPy_GetOccludersF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
index a0232826fed..dd1492e940e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
@@ -67,9 +67,11 @@ PyTypeObject GetShapeF1D_Type = {
sizeof(BPy_GetShapeF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
index 0a9acf068e0..c3750734efc 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
@@ -67,9 +67,11 @@ PyTypeObject ChainingTimeStampF1D_Type = {
sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
index 976a9c4f972..85738684e44 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
@@ -67,9 +67,11 @@ PyTypeObject IncrementChainingTimeStampF1D_Type = {
sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
index 99a40cc154a..1f577820da4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
@@ -65,9 +65,11 @@ PyTypeObject TimeStampF1D_Type = {
sizeof(BPy_TimeStampF1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
index 8f649f48e41..227aca2b5c6 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
@@ -58,9 +58,11 @@ PyTypeObject FalseUP0D_Type = {
sizeof(BPy_FalseUP0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
index 1d068055dd5..5f5c756b28d 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
@@ -58,9 +58,11 @@ PyTypeObject TrueUP0D_Type = {
sizeof(BPy_TrueUP0D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
index 658c12ecae5..b3f9c225931 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
@@ -59,9 +59,11 @@ PyTypeObject ContourUP1D_Type = {
sizeof(BPy_ContourUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
index 3683159a183..f865fe5013d 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
@@ -75,9 +75,11 @@ PyTypeObject DensityLowerThanUP1D_Type = {
sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
index a9f3812382b..154b44ff81a 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
@@ -70,9 +70,11 @@ PyTypeObject EqualToChainingTimeStampUP1D_Type = {
sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
index 9e2bde8f6c7..2bb9dbaf484 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
@@ -69,9 +69,11 @@ PyTypeObject EqualToTimeStampUP1D_Type = {
sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
index ba9a9af429f..7b9923d7b6c 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
@@ -63,9 +63,11 @@ PyTypeObject ExternalContourUP1D_Type = {
sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
index c3c73b77c1c..ec1a02e13aa 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
@@ -58,9 +58,11 @@ PyTypeObject FalseUP1D_Type = {
sizeof(BPy_FalseUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
index c16edfff96b..b9a76f91c21 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
@@ -74,9 +74,11 @@ PyTypeObject QuantitativeInvisibilityUP1D_Type = {
sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
index 54075f4b444..68f0ea7a913 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
@@ -70,9 +70,11 @@ PyTypeObject ShapeUP1D_Type = {
sizeof(BPy_ShapeUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
index b1b97b10282..362bcc4cea8 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
@@ -58,9 +58,11 @@ PyTypeObject TrueUP1D_Type = {
sizeof(BPy_TrueUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
index cbeb728de07..9329e3a7628 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
@@ -71,9 +71,11 @@ PyTypeObject WithinImageBoundaryUP1D_Type = {
sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */
0, /* tp_itemsize */
nullptr, /* tp_dealloc */
- /* Incompatible with Python3.8+ (deprecated function).
- * NOLINTNEXTLINE: modernize-use-nullptr. */
- 0, /* tp_print */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c
index 2168e0d1730..28689bb8b7e 100644
--- a/source/blender/python/bmesh/bmesh_py_ops.c
+++ b/source/blender/python/bmesh/bmesh_py_ops.c
@@ -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,
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index 6f5f36ec42f..38191ffc8bd 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -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; */
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c
index 5dc4aa6ce7c..1ebb8de2f7a 100644
--- a/source/blender/python/generic/imbuf_py_api.c
+++ b/source/blender/python/generic/imbuf_py_api.c
@@ -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; */
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index 30e0d94939d..6ccefe5a74e 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -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,
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c
index 061595a6c5d..adab984057b 100644
--- a/source/blender/python/intern/bpy_library_load.c
+++ b/source/blender/python/intern/bpy_library_load.c
@@ -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,
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index c16715b46fb..5ae90577240 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -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,
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 80efbf6fbac..d3bcd2376ee 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -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; */