diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-11-19 16:13:54 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-11-19 16:15:06 -0600 |
| commit | c06fc8e02dc7c17e827e3fe736dc7226d7819452 (patch) | |
| tree | b125b0da810b21b895d7f9cc909002aff7f19d96 /py/pystack.c | |
| parent | d5f6748d1bea832c6f483ca8b0095e776eaca2df (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.c | 4 |
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; |
