From 92bdf28e42ff92fc46f5cc65ac7f693fca911ed1 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 18 Jan 2021 09:07:21 -0800 Subject: [PATCH] Add more _Py_NO_RETURN markers (#1150) --- src/core/hiwire.c | 2 +- src/core/hiwire.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hiwire.c b/src/core/hiwire.c index 6c66343a4..6679f9a2c 100644 --- a/src/core/hiwire.c +++ b/src/core/hiwire.c @@ -222,7 +222,7 @@ EM_JS_REF(JsRef, hiwire_float64array, (f64 * ptr, int len), { return Module.hiwire.new_value(array); }) -EM_JS(void, hiwire_throw_error, (JsRef idmsg), { +EM_JS(void _Py_NO_RETURN, hiwire_throw_error, (JsRef idmsg), { let jsmsg = Module.hiwire.get_value(idmsg); Module.hiwire.decref(idmsg); throw new Error(jsmsg); diff --git a/src/core/hiwire.h b/src/core/hiwire.h index b78af10fa..6ad5ce6d1 100644 --- a/src/core/hiwire.h +++ b/src/core/hiwire.h @@ -312,7 +312,7 @@ hiwire_push_object_pair(JsRef idobj, JsRef idkey, JsRef idval); * The message is conventionally a Javascript string, but that is not required. * TODO: should be hiwire_set_error. */ -void +void _Py_NO_RETURN hiwire_throw_error(JsRef idmsg); /**