Message338603
I don't think calling APIs like _PyDict_CheckConsistency() is super useful. Can the PR find bugs like issue33803 quickly?
I think calling tp_traverse is better.
static int
check_object(PyObject *obj, void *unused)
{
_PyObject_ASSERT(obj, Py_REFCNT(obj) > 0);
return 0;
}
static void
gc_check_object(PyGC_Head *gc)
{
PyObject *op = FROM_GC(gc);
_PyObject_ASSERT(op, Py_REFCNT(obj) > 0);
_PyObject_ASSERT(op, _PyObject_GC_IS_TRACKED(op));
Py_Type(op)->tp_traverse(op, (visitproc)check_object, NULL);
} |
|
Date |
User |
Action |
Args |
2019-03-22 13:32:40 | methane | set | recipients:
+ methane, vstinner, serhiy.storchaka, pablogsal |
2019-03-22 13:32:40 | methane | set | messageid: <1553261560.24.0.942373542817.issue36389@roundup.psfhosted.org> |
2019-03-22 13:32:40 | methane | link | issue36389 messages |
2019-03-22 13:32:40 | methane | create | |
|