pike.git / src / constants.c

version» Context lines:

pike.git/src/constants.c:145:   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;    -  n=make_shared_string(name); +  n=make_shared_static_string(name, strlen(name), eightbit);    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);   }      PMOD_EXPORT void add_efun(const char *name, c_fun fun, const char *type, int flags)   {    add_efun2(name,fun,type,flags,0,0);
pike.git/src/constants.c:174:   {    struct svalue s;    struct pike_string *n;    struct pike_type *t;      #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); +  n = make_shared_static_string(name, name_length, eightbit);    t = make_pike_type(type);   #ifdef DEBUG    check_type_string(t);   #endif    add_ref(n);    SET_SVAL(s, T_FUNCTION, FUNCTION_BUILTIN, efun,    low_make_callable(fun, n, t, flags, optimize, docode));    mapping_string_insert(builtin_constants, n, &s);    free_svalue(&s);    free_string(n);