pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:4405:    * type_from_visit_fn only returns types that fit in a TYPE_FIELD. */   PMOD_EXPORT visit_thing_fn *const visit_fn_from_type[MAX_TYPE + 1] = {    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1,    (visit_thing_fn *) (ptrdiff_t) -1, -  (visit_thing_fn *) &visit_array, -  (visit_thing_fn *) &visit_mapping, -  (visit_thing_fn *) &visit_multiset, -  (visit_thing_fn *) &visit_object, +  &visit_array, +  &visit_mapping, +  &visit_multiset, +  &visit_object,    /* visit_function must be called with a whole svalue, so it's not    * included here. */    (visit_thing_fn *) (ptrdiff_t) -1, -  (visit_thing_fn *) &visit_program, -  (visit_thing_fn *) &visit_string, -  (visit_thing_fn *) &visit_type, +  &visit_program, +  &visit_string, +  &visit_type,   };      PMOD_EXPORT TYPE_T type_from_visit_fn (visit_thing_fn *fn)   {    /* Since the array to search is so small, linear search is probably    * fastest. */    unsigned t;    for (t = 0; t < NELEM (visit_fn_from_type); t++)    if (visit_fn_from_type[t] == fn)    return (TYPE_T) t;