pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:3920:    "Program->identifier_index[%ld]\n",    (long)(e-1), (long)e);    }    }      }   #endif      static void f_dispatch_variant(INT32 args);    + int low_is_variant_dispatcher(struct identifier *id) + { +  if (!id) return 0; +  return (IDENTIFIER_IS_C_FUNCTION(id->identifier_flags) && +  !IDENTIFIER_IS_ALIAS(id->identifier_flags) && +  (id->func.c_fun == f_dispatch_variant)); + } +    int is_variant_dispatcher(struct program *prog, int fun)   {    struct reference *ref;    struct identifier *id;    if (fun < 0) return 0;    ref = PTR_FROM_INT(prog, fun);    id = ID_FROM_PTR(prog, ref); -  return (IDENTIFIER_IS_C_FUNCTION(id->identifier_flags) && -  !IDENTIFIER_IS_ALIAS(id->identifier_flags) && -  (id->func.c_fun == f_dispatch_variant)); +  return low_is_variant_dispatcher(id);   }      static int add_variant_dispatcher(struct pike_string *name,    struct pike_type *type,    int id_flags)   {    union idptr dispatch_fun;    dispatch_fun.c_fun = f_dispatch_variant;    return define_function(name, type, id_flags & ~(ID_VARIANT|ID_LOCAL),    IDENTIFIER_C_FUNCTION, &dispatch_fun, 0);