pike.git / src / constants.c

version» Context lines:

pike.git/src/constants.c:127:    const char *name,    const char *type,    int flags,    optimize_fun optimize,    docode_fun docode)   {    return low_make_callable(fun, make_shared_string(name), parse_type(type),    flags, optimize, docode);   }    - PMOD_EXPORT struct callable *add_efun2(const char *name, + PMOD_EXPORT void add_efun2(const char *name,    c_fun fun,    const char *type,    int flags,    optimize_fun optimize,    docode_fun docode)   {    struct svalue s;    struct pike_string *n; -  struct callable *ret; +        n=make_shared_string(name);    SET_SVAL(s, T_FUNCTION, FUNCTION_BUILTIN, efun,    make_callable(fun, name, type, flags, optimize, docode));    low_add_efun(n, &s);    free_svalue(&s);    free_string(n); -  return ret; +    }    - PMOD_EXPORT struct callable *add_efun(const char *name, c_fun fun, const char *type, int flags) + PMOD_EXPORT void add_efun(const char *name, c_fun fun, const char *type, int flags)   { -  return add_efun2(name,fun,type,flags,0,0); +  add_efun2(name,fun,type,flags,0,0);   }    - PMOD_EXPORT struct callable *quick_add_efun(const char *name, ptrdiff_t name_length, + PMOD_EXPORT void quick_add_efun(const char *name, ptrdiff_t name_length,    c_fun fun,    const char *type, ptrdiff_t type_length,    int flags,    optimize_fun optimize,    docode_fun docode)   {    struct svalue s;    struct pike_string *n;    struct pike_type *t; -  struct callable *ret; +       #ifdef PIKE_DEBUG    if(simple_mapping_string_lookup(builtin_constants, name))    Pike_fatal("%s added as efun more than once.\n", name);   #endif       n = make_shared_binary_string(name, name_length);    t = make_pike_type(type);   #ifdef DEBUG    check_type_string(t);   #endif    add_ref(n);    SET_SVAL(s, T_FUNCTION, FUNCTION_BUILTIN, efun, -  ret = low_make_callable(fun, n, t, flags, optimize, docode)); +  low_make_callable(fun, n, t, flags, optimize, docode));    mapping_string_insert(builtin_constants, n, &s);    free_svalue(&s);    free_string(n); -  return ret; +    }      PMOD_EXPORT void visit_callable (struct callable *c, int action)   {    switch (action) {   #ifdef PIKE_DEBUG    default:    Pike_fatal ("Unknown visit action %d.\n", action);    case VISIT_NORMAL:    case VISIT_COMPLEX_ONLY: