Branch: Tag:

2016-01-26

2016-01-26 21:08:15 by Martin Nilsson <nilsson@fastmail.com>

SIMPLE_TOO_FEW_ARGS_ERROR should be SIMPLE_WRONG_NUM_ARGS_ERROR since long ago. Replaced them and tighten up argument control in places.

1992:    int tmp;       if (args < 1) { -  SIMPLE_TOO_FEW_ARGS_ERROR("create", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("create", 1);    }    if (!callablep(Pike_sp - args)) {    SIMPLE_ARG_TYPE_ERROR("create", 1, "function");
2075: Inside #if defined(UNIX_THREADS)
   if(args)    c=Pike_sp[-args].u.integer;    else -  SIMPLE_TOO_FEW_ARGS_ERROR("thread_set_concurrency", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("thread_set_concurrency", 1);    pop_n_elems(args);    num_lwps=c;    th_setconcurrency(c);
3166:    if(args>1)    pop_n_elems(args-1);    else if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("Thread.Local.set", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("Thread.Local.set", 1);       if(Pike_interpreter.thread_state == NULL)    Pike_error("Trying to set Thread.Local without thread!\n");