pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:5549:    *! string may be in use in some unrelated part of the program.    */   void f_count_memory (INT32 args)   {    struct svalue *collect_internal = NULL;    unsigned count_internal, count_cyclic, count_visited;    unsigned count_visits, count_revisits, count_rounds;    int collect_stats = 0, return_count = 0;       if (args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR ("count_memory", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR ("count_memory", 1);       mc_block_lookahead = mc_block_lookahead_default;    mc_block_pike_cycle_depth = 0;    mc_block_strings = 0;       if (TYPEOF(Pike_sp[-args]) == T_MAPPING) {    struct mapping *opts = Pike_sp[-args].u.mapping;    struct pike_string *ind;    struct svalue *val;   
pike.git/src/gc.c:6157:    *! element, and where the elements refer to each other in order, and the    *! last element refers to the first.    *! @endmixed    */   void f_identify_cycle(INT32 args)   {    struct svalue *s;    struct mc_marker *m;    struct svalue *k;    -  if (args < 1) { -  SIMPLE_TOO_FEW_ARGS_ERROR("identify_loops", 1); -  } +  if (args != 1) +  SIMPLE_WRONG_NUM_ARGS_ERROR("identify_loops", 1);    -  if (args > 1) pop_n_elems(args-1); -  args = 1; -  +     s = Pike_sp - 1;       if (!REFCOUNTED_TYPE(TYPEOF(*s))) {    SIMPLE_ARG_TYPE_ERROR("identify_loops", 1,    "array|multiset|mapping|object|program|string|type");    }    if (TYPEOF(*s) == T_FUNCTION) {    if (SUBTYPEOF(*s) == FUNCTION_BUILTIN) {    SIMPLE_ARG_TYPE_ERROR("identify_loops", 1,    "array|multiset|mapping|object|program|string|type");