pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:8039:       out->type_field=BIT_ARRAY;    pop_n_elems(args);    push_array(out);    return;   }      /*! @endmodule    */    - #ifdef DEBUG_MALLOC - /*! @decl void reset_dmalloc() -  *! @belongs Debug -  *! -  *! @note -  *! Only available when compiled with dmalloc. -  */ - PMOD_EXPORT void f__reset_dmalloc(INT32 args) - { -  pop_n_elems(args); -  reset_debug_malloc(); - } -  - /*! @decl void dmalloc_set_name(string filename, int(1..) linenumber) -  *! @belongs Debug -  *! -  *! @note -  *! Only available when compiled with dmalloc. -  */ - PMOD_EXPORT void f__dmalloc_set_name(INT32 args) - { -  char *s; -  INT_TYPE i; -  extern char * dynamic_location(const char *file, INT_TYPE line); -  extern char * dmalloc_default_location; -  -  if(args) -  { -  get_all_args("_dmalloc_set_name", args, "%s%+", &s, &i); -  dmalloc_default_location = dynamic_location(s, i); -  }else{ -  dmalloc_default_location=0; -  } -  pop_n_elems(args); - } -  - /*! @decl void list_open_fds() -  *! @belongs Debug -  *! -  *! @note -  *! Only available when compiled with dmalloc. -  */ - PMOD_EXPORT void f__list_open_fds(INT32 UNUSED(args)) - { -  extern void list_open_fds(void); -  list_open_fds(); - } -  - /*! @decl void dump_dmalloc_locations(string|array|mapping| @ -  *! multiset|function|object| @ -  *! program|type o) -  *! @belongs Debug -  *! -  *! @note -  *! Only available when compiled with dmalloc. -  */ - PMOD_EXPORT void f__dump_dmalloc_locations(INT32 args) - { -  if(args) -  debug_malloc_dump_references (Pike_sp[-args].u.refs, 2, 1, 0); -  pop_n_elems(args-1); - } - #endif -  +    #ifdef PIKE_DEBUG   /*! @decl void locate_references(string|array|mapping| @    *! multiset|function|object| @    *! program|type o)    *! @belongs Debug    *!    *! This function is mostly intended for debugging. It will search through    *! all data structures in Pike looking for @[o] and print the    *! locations on stderr. @[o] can be anything but @expr{int@} or    *! @expr{float@}.
pike.git/src/builtin_functions.c:9757:    tFuncV(tNone,tMix,tSetvar(1,tMix)),tArr(tVar(1)))),    OPT_TRY_OPTIMIZE);       ADD_FUNCTION2("inherit_list", f_inherit_list,    tFunc(tOr(tObj,tPrg(tObj)),tArr(tPrg(tObj))), 0, OPT_TRY_OPTIMIZE);    ADD_FUNCTION2("program_identifier_defined", f_program_identifier_defined,    tFunc(tOr(tObj,tPrg(tObj)) tString,tString), 0, OPT_TRY_OPTIMIZE);    ADD_FUNCTION2("function_defined", f_function_defined,    tFunc(tFunction,tString), 0, OPT_TRY_OPTIMIZE);    - #ifdef DEBUG_MALLOC -  - /* function(void:void) */ -  ADD_EFUN("_reset_dmalloc",f__reset_dmalloc, -  tFunc(tVoid,tVoid),OPT_SIDE_EFFECT); -  ADD_EFUN("_dmalloc_set_name",f__dmalloc_set_name, -  tOr(tFunc(tStr tIntPos,tVoid), tFunc(tVoid,tVoid)),OPT_SIDE_EFFECT); -  ADD_EFUN("_list_open_fds",f__list_open_fds, -  tFunc(tVoid,tVoid),OPT_SIDE_EFFECT); -  ADD_EFUN("_dump_dmalloc_locations",f__dump_dmalloc_locations, -  tFunc(tSetvar(1,tMix),tVar(1)),OPT_SIDE_EFFECT); - #endif +    #ifdef PIKE_DEBUG      /* function(1=mixed:1) */    ADD_EFUN("_locate_references",f__locate_references,    tFunc(tSetvar(1,tMix),tVar(1)),OPT_SIDE_EFFECT);    ADD_EFUN("_describe",f__describe,    tFunc(tSetvar(1,tMix),tVar(1)),OPT_SIDE_EFFECT);    ADD_EFUN("_gc_set_watch", f__gc_set_watch,    tFunc(tComplex,tVoid), OPT_SIDE_EFFECT);    ADD_EFUN("_dump_backlog", f__dump_backlog,