summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0e2d975..6484e89 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3932,7 +3932,7 @@ type_new_alloc(type_new_ctx *ctx)
et->ht_token = NULL;
#ifdef Py_GIL_DISABLED
- _PyType_AssignId(et);
+ et->unique_id = _PyObject_AssignUniqueId((PyObject *)et);
#endif
return type;
@@ -5026,7 +5026,7 @@ PyType_FromMetaclass(
#ifdef Py_GIL_DISABLED
// Assign a type id to enable thread-local refcounting
- _PyType_AssignId(res);
+ res->unique_id = _PyObject_AssignUniqueId((PyObject *)res);
#endif
/* Ready the type (which includes inheritance).
@@ -6080,7 +6080,7 @@ type_dealloc(PyObject *self)
Py_XDECREF(et->ht_module);
PyMem_Free(et->_ht_tpname);
#ifdef Py_GIL_DISABLED
- _PyType_ReleaseId(et);
+ _PyObject_ReleaseUniqueId(et->unique_id);
#endif
et->ht_token = NULL;
Py_TYPE(type)->tp_free((PyObject *)type);