From 2a0abbb7f6ddab87463d7c9bc97917238e25784b Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Fri, 2 Sep 2022 14:29:49 -0600 Subject: [PATCH] Python: Use PyType_Modified() instead of modifying flags. Closes #2345 Also supported with Py_LIMITED_API --- Lib/python/pyrun.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index a1ac95baf..0dcbc1ce5 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -1515,7 +1515,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) Py_DECREF(inst); inst = 0; } else { - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + PyType_Modified(Py_TYPE(inst)); } } }