From 4be6773b9052f3dc6ecbb758ef4148bc71d59b2f Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 27 Oct 2018 02:43:39 +0300 Subject: [PATCH] Add missing DUK_DCERROR_UNSUPPORTED() macro --- src-input/duk_error.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src-input/duk_error.h b/src-input/duk_error.h index ce593b2e..dcfd618e 100644 --- a/src-input/duk_error.h +++ b/src-input/duk_error.h @@ -181,6 +181,10 @@ #define DUK_ERROR_UNSUPPORTED(thr) do { \ DUK_ERROR((thr), DUK_ERR_ERROR, DUK_STR_UNSUPPORTED); \ } while (0) +#define DUK_DCERROR_UNSUPPORTED(thr) do { \ + DUK_ERROR_UNSUPPORTED((thr)); \ + return 0; \ + } while (0) #define DUK_ERROR_ERROR(thr,msg) do { \ duk_err_error((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (msg)); \ } while (0) @@ -269,6 +273,10 @@ #define DUK_ERROR_UNSUPPORTED(thr) do { \ duk_err_error((thr)); \ } while (0) +#define DUK_DCERROR_UNSUPPORTED(thr) do { \ + DUK_UNREF((thr)); \ + return DUK_RET_ERROR; \ + } while (0) #define DUK_ERROR_ERROR(thr,msg) do { \ duk_err_error((thr)); \ } while (0)