pike.git / src / constants.c

version» Context lines:

pike.git/src/constants.c:36:    s.u.string=name;       if(fun)    {    mapping_insert(builtin_constants, &s, fun);    }else{    map_delete(builtin_constants, &s);    }   }    + void low_add_constant(char *name, struct svalue *fun) + { +  struct pike_string *p; +  p=make_shared_string(name); +  low_add_efun(p, fun); +  free_string(p); + } +  + void add_global_program(char *name, struct program *p) + { +  struct svalue s; +  s.type=T_PROGRAM; +  s.subtype=0; +  s.u.program=p; +  low_add_constant(name, &s); + } +    struct callable *make_callable(c_fun fun,    char *name,    char *type,    INT16 flags,    optimize_fun optimize,    docode_fun docode)   {    struct callable *f;    f=ALLOC_STRUCT(callable);    num_callable++;