pike.git / src / pike_modules.c

version» Context lines:

pike.git/src/pike_modules.c:288:      #define ZAP_LINKED_LIST_LEAKS(TYPE, START, STATICS) do { \    struct TYPE *x, *next; \    for (x = START; x; x = next) { \    struct marker *m = find_marker (x); \    next = x->next; \    if (m) { \    int is_static = 0; \    static const struct TYPE *statics[] = {STATICS NULL}; \    ptrdiff_t i; /* Use signed type to avoid warnings from gcc. */ \ -  INT32 refs; \ +  INT32 refs, gc_refs; \    for (i = 0; i < (ptrdiff_t) (NELEM (statics) - 1); i++) \    if (x == statics[i]) \    is_static = 1; \    refs = x->refs; \ -  while (refs > m->gc_refs + is_static) { \ +  gc_refs = m->gc_refs; \ +  while (refs > gc_refs + is_static) { \    PIKE_CONCAT(free_, TYPE) (x); \    refs--; \    } \    } \    } \    } while (0)       ZAP_LINKED_LIST_LEAKS (array, first_array, STATIC_ARRAYS);    ZAP_LINKED_LIST_LEAKS (multiset, first_multiset, NOTHING);    ZAP_LINKED_LIST_LEAKS (mapping, first_mapping, NOTHING);