summaryrefslogtreecommitdiff
path: root/py/modmath.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-06-15 11:54:41 +1000
committerDamien George <damien.p.george@gmail.com>2017-06-15 11:54:41 +1000
commit48d867b4a68e53901aac87c2ff0f2a7e65f735c7 (patch)
tree178bfc0dc13bcb3b9d77c8a99652e9a9dc057e7d /py/modmath.c
parent1e70fda69fcb4991eb60ed43e610f664ea1319e6 (diff)
all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.
Diffstat (limited to 'py/modmath.c')
-rw-r--r--py/modmath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/modmath.c b/py/modmath.c
index ddab337d0..10713234c 100644
--- a/py/modmath.c
+++ b/py/modmath.c
@@ -25,7 +25,7 @@
*/
#include "py/builtin.h"
-#include "py/nlr.h"
+#include "py/runtime.h"
#if MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_MATH
@@ -41,7 +41,7 @@
/// working with floating-point numbers.
STATIC NORETURN void math_error(void) {
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "math domain error"));
+ mp_raise_ValueError("math domain error");
}
#define MATH_FUN_1(py_name, c_name) \