pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:618:    *!    *! Cast operator.    *!    *! @note    *! The only supported type to cast to is @expr{"array"@}, which    *! generates an old-style error @expr{({@[message](),    *! @[backtrace]()})@}.    */   static void f_error_cast(INT32 args)   { -  if(Pike_sp[-1].u.string == literal_array_string) +  if(Pike_sp[-args].u.string == literal_array_string)    {    pop_stack();    apply_current (generic_err_message_fun, 0);    apply_current (generic_err_backtrace_fun, 0);    f_aggregate(2);    }    else    {    pop_stack();    push_undefined();
pike.git/src/error.c:653:    *!    *! @note    *! The error message is always terminated with a newline.    *!    *! @seealso    *! @[backtrace()]    */   static void f_error_index(INT32 args)   {    INT_TYPE ind; -  get_all_args("error->`[]",args,"%i",&ind); +  get_all_args("`[]",args,"%i",&ind);       switch(ind)    {    case 0:    pop_n_elems(args);    apply_current (generic_err_message_fun, 0);    break;    case 1:    pop_n_elems(args);    apply_current (generic_err_backtrace_fun, 0);    break;    default: -  index_error("error->`[]", Pike_sp-args, args, NULL, Pike_sp-args, +  index_error("`[]", Pike_sp-args, args, NULL, Pike_sp-args,    "Index %"PRINTPIKEINT"d is out of range 0..1.\n", ind);    break;    }   }      static void f_error__sizeof(INT32 args)   {    pop_n_elems(args);    push_int(2);   }