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.

256:    do_close(p);       if(args < 1) -  SIMPLE_TOO_FEW_ARGS_ERROR("bind", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("bind", 1);       if(TYPEOF(Pike_sp[-args]) != PIKE_T_INT &&    (TYPEOF(Pike_sp[-args]) != PIKE_T_STRING ||
511:    struct port *p = THIS;       if(TYPEOF(Pike_sp[-args]) != PIKE_T_STRING) -  SIMPLE_TOO_FEW_ARGS_ERROR("create", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("create", 1);       /* FIXME: Check that the argument is "stdin". */   
686:    struct port *p = THIS;    struct Backend_struct *backend;    -  if (!args) -  SIMPLE_TOO_FEW_ARGS_ERROR ("set_backend", 1); +  if (args!=1) +  SIMPLE_WRONG_NUM_ARGS_ERROR ("set_backend", 1);    if (TYPEOF(Pike_sp[-args]) != PIKE_T_OBJECT)    SIMPLE_ARG_TYPE_ERROR ("set_backend", 1, "object(Pike.Backend)");    backend = get_storage (Pike_sp[-args].u.object, Backend_program);