Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Open
Description
Feature or enhancement
Proposal:
In the implementation of the reference cycle garbage collector,gc.c
file, I have noticed that we use the followingfor-loop
pattern over and over to traverse aPyGC_Head
list:
for (gc=GC_NEXT(list);gc!=list;gc=GC_NEXT(gc)) {/* ... */}
However, inpycore_llist.h
we avoided that by usingllist_for_each
macro as:
// Iterate over a list.#definellist_for_each(node,head) \ for (node = (head)->next; node != (head); node = node->next)
I propose adding a new macro asgc_list_for_each
to thegc_list_xxx
family to serve the same purpose:
#definegc_list_for_each(gc,list) \ for (gc = GC_NEXT((list)); gc != (list); gc = GC_NEXT(gc))
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response