summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-11 00:21:54 (GMT)
committerGitHub <noreply@github.com>2020-04-11 00:21:54 (GMT)
commitf13072b8a89a922285737988b086beb4b06c6648 (patch)
tree14b73d6eb614949e2ce81db59f13c3b13eb475d9 /Modules/_testcapimodule.c
parent0361556537686f857f1025ead75e6af4ca7cc94a (diff)
downloadcpython-f13072b8a89a922285737988b086beb4b06c6648.zip
cpython-f13072b8a89a922285737988b086beb4b06c6648.tar.gz
cpython-f13072b8a89a922285737988b086beb4b06c6648.tar.bz2
bpo-40241: Add PyObject_GC_IsTracked and PyObject_GC_IsFinalized to the public C-API (GH-19461)
Add the functions PyObject_GC_IsTracked and PyObject_GC_IsFinalized to the public API to allow to query if Python objects are being currently tracked or have been already finalized by the garbage collector respectively.
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 3cc5586..0a30fea 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -3588,7 +3588,7 @@ slot_tp_del(PyObject *self)
_Py_NewReference(self);
Py_SET_REFCNT(self, refcnt);
}
- assert(!PyType_IS_GC(Py_TYPE(self)) || _PyObject_GC_IS_TRACKED(self));
+ assert(!PyType_IS_GC(Py_TYPE(self)) || PyObject_GC_IsTracked(self));
/* If Py_REF_DEBUG macro is defined, _Py_NewReference() increased
_Py_RefTotal, so we need to undo that. */
#ifdef Py_REF_DEBUG