pike.git / src / constants.c

version» Context lines:

pike.git/src/constants.c:10:   #include "program.h"   #include "pike_types.h"   #include "stralloc.h"   #include "pike_memory.h"   #include "interpret.h"   #include "mapping.h"   #include "pike_error.h"   #include "security.h"   #include "block_alloc.h"    - RCSID("$Id: constants.c,v 1.34 2002/01/16 02:54:09 nilsson Exp $"); + RCSID("$Id: constants.c,v 1.35 2002/01/27 18:25:43 mast Exp $");      struct mapping *builtin_constants = 0;      PMOD_EXPORT struct mapping *get_builtin_constants(void)   { -  if(!builtin_constants) -  builtin_constants=allocate_mapping(20); -  +     return builtin_constants;   }      void low_add_efun(struct pike_string *name, struct svalue *fun)   {    struct svalue s;    -  if(!builtin_constants) -  builtin_constants=allocate_mapping(20); -  +     s.type=T_STRING;    s.subtype=0;    s.u.string=name;       if(fun)    {    mapping_insert(builtin_constants, &s, fun);    }else{    map_delete(builtin_constants, &s);    }
pike.git/src/constants.c:185: Inside #if defined(PIKE_DEBUG)
   {    if(b->x[e].name)    {    fprintf(stderr,"%010ld @E@: %s\n",b->x[e].runs, b->x[e].name->str);    }    }    }   }   #endif    + void init_builtin_constants(void) + { +  builtin_constants = allocate_mapping(20); + } +    void cleanup_added_efuns(void)   {   #ifdef DO_PIKE_CLEANUP    if(builtin_constants)    {    free_mapping(builtin_constants);    builtin_constants=0;    }   #endif   }