diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-05-17 02:07:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 02:07:21 (GMT) |
commit | d852142cd728f45372ba6137bd87e29ba7b5b4d2 (patch) | |
tree | 7540147fed0705ddc873facf2b93774db4f39cc1 /Modules/_testcapimodule.c | |
parent | e5f41d2f1e0b8b8e61d5fa427c19bd1ea90fd9a3 (diff) | |
download | cpython-d852142cd728f45372ba6137bd87e29ba7b5b4d2.zip cpython-d852142cd728f45372ba6137bd87e29ba7b5b4d2.tar.gz cpython-d852142cd728f45372ba6137bd87e29ba7b5b4d2.tar.bz2 |
Replace _PyGC_REFS macros with higher level macros (GH-6852)
Only gcmodule.c uses _PyGC_REFS* macros now.
This makes easy to read GC code.
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r-- | Modules/_testcapimodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 0e48463..3086aab 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -3215,8 +3215,7 @@ slot_tp_del(PyObject *self) _Py_NewReference(self); self->ob_refcnt = refcnt; } - assert(!PyType_IS_GC(Py_TYPE(self)) || - _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); + assert(!PyType_IS_GC(Py_TYPE(self)) || _PyObject_GC_IS_TRACKED(self)); /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so * we need to undo that. */ _Py_DEC_REFTOTAL; |