diff --git a/include/picrin.h b/include/picrin.h index 6a1b3073..51fd36eb 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -180,10 +180,15 @@ void pic_import(pic_state *, pic_value); void pic_export(pic_state *, pic_sym); noreturn void pic_abort(pic_state *, const char *); -noreturn void pic_error(pic_state *, const char *); /* obsoleted */ noreturn void pic_errorf(pic_state *, const char *, ...); void pic_warn(pic_state *, const char *); +/* obsoleted */ +noreturn static inline void pic_error(pic_state *pic, const char *msg) +{ + pic_errorf(pic, msg); +} + const char *pic_errmsg(pic_state *); pic_value pic_write(pic_state *, pic_value); /* returns given obj */ diff --git a/src/error.c b/src/error.c index 42ccacf3..9cd973c6 100644 --- a/src/error.c +++ b/src/error.c @@ -58,12 +58,6 @@ pic_errmsg(pic_state *pic) return pic_str_cstr(pic->err->msg); } -void -pic_error(pic_state *pic, const char *msg) -{ - pic_errorf(pic, msg); -} - void pic_errorf(pic_state *pic, const char *fmt, ...) {