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)); } } }