pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:3063:       if (compiler_frame && compiler_frame->current_object->prog) {    ref_push_object(compiler_frame->current_object);    return;    }    }       push_undefined();   }    - /*! @decl CompilationHandler get_active_compilation_handler() -  *! -  *! Returns the currently active compilation compatibility handler, or -  *! @tt{0@} (zero) if none is active. -  *! -  *! @note -  *! This function should only be used during a call of @[compile()]. -  *! -  *! @seealso -  *! @[get_active_error_handler()], @[compile()], -  *! @[master()->get_compilation_handler()], @[CompilationHandler] -  */ - PMOD_EXPORT void f_get_active_compilation_handler(INT32 args) - { -  struct compilation *c = NULL; -  -  if (compilation_program) { -  struct pike_frame *compiler_frame = Pike_fp; -  -  while (compiler_frame && -  (compiler_frame->context->prog != compilation_program)) { -  compiler_frame = compiler_frame->next; -  } -  -  if (compiler_frame) { -  c = (struct compilation *)compiler_frame->current_storage; -  } -  } -  -  pop_n_elems(args); -  if (c && c->compat_handler) { -  ref_push_object(c->compat_handler); -  } else { -  push_int(0); -  } - } -  - /*! @decl CompilationHandler get_active_error_handler() -  *! -  *! Returns the currently active compilation error handler -  *! (second argument to @[compile()]), or @tt{0@} (zero) if none -  *! is active. -  *! -  *! @note -  *! This function should only be used during a call of @[compile()]. -  *! -  *! @seealso -  *! @[get_active_compilation_handler()], @[compile()], @[CompilationHandler] -  */ - PMOD_EXPORT void f_get_active_error_handler(INT32 args) - { -  struct compilation *c = NULL; -  -  if (compilation_program) { -  struct pike_frame *compiler_frame = Pike_fp; -  -  while (compiler_frame && -  (compiler_frame->context->prog != compilation_program)) { -  compiler_frame = compiler_frame->next; -  } -  -  if (compiler_frame) { -  c = (struct compilation *)compiler_frame->current_storage; -  } -  } -  -  pop_n_elems(args); -  if (c && c->handler) { -  ref_push_object(c->handler); -  } else { -  push_int(0); -  } - } -  +    /*! @decl array allocate(int size)    *! @decl array allocate(int size, mixed init)    *!    *! Allocate an array of @[size] elements. If @[init] is specified    *! then each element is initialized by copying that value    *! recursively.    *!    *! @seealso    *! @[sizeof()], @[aggregate()], @[arrayp()]    */
pike.git/src/builtin_functions.c:9877:    OPT_TRY_OPTIMIZE, fix_aggregate_mapping_type, 0);       /* function(:mapping(string:mixed)) */    ADD_EFUN("all_constants",f_all_constants,    tFunc(tNone,tMap(tStr,tMix)),OPT_EXTERNAL_DEPEND);       /* function(:object) */    ADD_EFUN("get_active_compiler", f_get_active_compiler,    tFunc(tNone, tObj), OPT_EXTERNAL_DEPEND);    -  /* function(:object) */ -  ADD_EFUN("get_active_compilation_handler", -  f_get_active_compilation_handler, -  tFunc(tNone, tObj), OPT_EXTERNAL_DEPEND); -  -  /* function(:object) */ -  ADD_EFUN("get_active_error_handler", -  f_get_active_error_handler, -  tFunc(tNone, tObj), OPT_EXTERNAL_DEPEND); -  +     /* function(int,void|0=mixed:array(0)) */    ADD_EFUN("allocate", f_allocate,    tFunc(tInt tOr(tVoid,tSetvar(0,tMix)),tArr(tVar(0))), 0);       /* function(mixed:int) */    ADD_EFUN("arrayp", f_arrayp,tFunc(tMix,tInt01),0);       /* function(string...:string) */    ADD_EFUN("combine_path_nt",f_combine_path_nt,tFuncV(tNone,tStr,tStr),0);    ADD_EFUN("combine_path_unix",f_combine_path_unix,tFuncV(tNone,tStr,tStr),0);