Branch: Tag:

2018-02-25

2018-02-25 05:34:51 by Martin Nilsson <nilsson@fastmail.com>

Uncomplicate ERROR_DONE

878:    DWERROR("%s(): Throwing a " #FEL " error\n", func); \    o=fast_clone_object(PIKE_CONCAT(FEL,_error_program))    - #define ERROR_DONE(FOO) \ -  PIKE_CONCAT(FOO,_error_va(o,func, \ -  base_sp, args, \ -  desc, &foo)); \ + #define ERROR_DONE() \ +  generic_error_va(o,func, base_sp, args, desc, &foo); \    va_end(foo)      #define ERROR_STRUCT(STRUCT,O) \
994:    va_start(foo,desc);    ASSERT_THREAD_SWAPPED_IN();    DWERROR("%s(): Throwing an error object\n", func); -  ERROR_DONE(generic); +  ERROR_DONE();   }      /* coverity[+kill] */
1004:    const char *desc, ...) ATTRIBUTE((noreturn))   {    INIT_ERROR(generic); -  ERROR_DONE(generic); +  ERROR_DONE();   }      /* coverity[+kill] */
1018:    INIT_ERROR(index);    ERROR_COPY_SVALUE(index, value);    ERROR_COPY_SVALUE(index, index); -  ERROR_DONE(generic); +  ERROR_DONE();   }      /* coverity[+kill] */
1041:    ERROR_COPY_SVALUE(bad_argument, got_value);    DWERROR("%s():Bad arg %d (expected %s)\n",    func, which_argument, expected_type); -  ERROR_DONE(generic); +  ERROR_DONE();   }      /* coverity[+kill] */
1059:    SET_SVAL(ERROR_STRUCT(math,o)->number, PIKE_T_INT, NUMBER_UNDEFINED,    integer, 0);    } -  ERROR_DONE(generic); +  ERROR_DONE();   }      /* coverity[+kill] */
1074:    if(args>=0) base_sp = Pike_sp-args;    ERROR_COPY(resource, howmuch);    ERROR_STRUCT(resource,o)->resource_type=make_shared_string("memory"); -  ERROR_DONE(generic); +  ERROR_DONE();   }      PMOD_EXPORT DECLSPEC(noreturn) void out_of_memory_error (