From b536702c01c86da6d2daeeaed995ee912f67701b Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Wed, 20 Nov 2019 15:40:14 +0100 Subject: [PATCH] Fix missing-field-initializers warning with Py3.8 Python 3.8 adds tp_vectorcall, tp_print is added for compat just for 3.8 https://github.com/python/cpython/pull/13185/files#diff-b5db2632fa7acaf3b44abb56f18b9615 --- Lib/python/builtin.swg | 12 ++++++++++++ Lib/python/pyinit.swg | 6 ++++++ Lib/python/pyrun.swg | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/Lib/python/builtin.swg b/Lib/python/builtin.swg index 28051e67b..5308748b7 100644 --- a/Lib/python/builtin.swg +++ b/Lib/python/builtin.swg @@ -256,6 +256,12 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -334,6 +340,12 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg index dfbf40b34..a6d609d56 100644 --- a/Lib/python/pyinit.swg +++ b/Lib/python/pyinit.swg @@ -186,6 +186,12 @@ swig_varlink_type(void) { #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 82859b887..ba8097cb7 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -696,6 +696,12 @@ SwigPyObject_TypeOnce(void) { #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -857,6 +863,12 @@ SwigPyPacked_TypeOnce(void) { #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */