summaryrefslogtreecommitdiff
path: root/py/pystack.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-11-19 16:13:54 -0600
committerJeff Epler <jepler@gmail.com>2020-11-19 16:15:06 -0600
commitc06fc8e02dc7c17e827e3fe736dc7226d7819452 (patch)
treeb125b0da810b21b895d7f9cc909002aff7f19d96 /py/pystack.c
parentd5f6748d1bea832c6f483ca8b0095e776eaca2df (diff)
Introduce, use mp_raise_arg1
This raises an exception with a given object value. Saves a bit of code size.
Diffstat (limited to 'py/pystack.c')
-rw-r--r--py/pystack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/pystack.c b/py/pystack.c
index f79ea9210..0def75b10 100644
--- a/py/pystack.c
+++ b/py/pystack.c
@@ -43,8 +43,8 @@ void *mp_pystack_alloc(size_t n_bytes) {
#endif
if (MP_STATE_THREAD(pystack_cur) + n_bytes > MP_STATE_THREAD(pystack_end)) {
// out of memory in the pystack
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_RuntimeError,
- MP_OBJ_NEW_QSTR(MP_QSTR_pystack_space_exhausted)));
+ mp_raise_arg1(&mp_type_RuntimeError,
+ MP_OBJ_NEW_QSTR(MP_QSTR_pystack_space_exhausted));
}
void *ptr = MP_STATE_THREAD(pystack_cur);
MP_STATE_THREAD(pystack_cur) += n_bytes;