reachableroots: bail if integer object cannot be allocated...
reachableroots: bail if integer object cannot be allocated
This patch also replaces Py_XDECREF() by Py_DECREF() because we known "val"
and "p" are not NULL.
BTW, we can eliminate some of these allocation and error handling of int objects
if the internal "seen" array has more information. For example,
enum { SEEN = 1, ROOT = 2, REACHABLE = 4 };
/* ... build ROOT mask from roots argument ... */
if (seen[revnum + 1] & ROOT) { /* instead of PySet_Contains(roots, val) */
>From my quick hack, it is 2x faster.