aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/sbkenum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/sbkenum.cpp')
-rw-r--r--sources/shiboken2/libshiboken/sbkenum.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/sbkenum.cpp b/sources/shiboken2/libshiboken/sbkenum.cpp
index 5f753293..11959121 100644
--- a/sources/shiboken2/libshiboken/sbkenum.cpp
+++ b/sources/shiboken2/libshiboken/sbkenum.cpp
@@ -312,11 +312,15 @@ void SbkEnumTypeDealloc(PyObject* pyObj)
SbkEnumType* sbkType = reinterpret_cast<SbkEnumType*>(pyObj);
PyObject_GC_UnTrack(pyObj);
+#ifndef Py_LIMITED_API
Py_TRASHCAN_SAFE_BEGIN(pyObj);
+#endif
if (PepType_SETP(sbkType)->converter) {
Shiboken::Conversions::deleteConverter(PepType_SETP(sbkType)->converter);
}
+#ifndef Py_LIMITED_API
Py_TRASHCAN_SAFE_END(pyObj);
+#endif
}
PyObject* SbkEnumTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds)