summaryrefslogtreecommitdiff
path: root/py/runtime.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-05-25 10:57:08 +1000
committerDamien George <damien@micropython.org>2023-06-01 13:01:07 +1000
commit48ffd6596e7a4c185a81be233b46d3c99a83a7ac (patch)
tree3a15993f388746d0125b875c621a8508b5c8b731 /py/runtime.h
parent3ae78e803b69c4f1fd5dfe7eb732de7075f12e6c (diff)
py: Change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE.
To be consistent with MP_UNARY_OP_INT_FLOAT and MP_UNARY_OP_INT_COMPLEX, and allow int() to first check if a type supports __int__ before trying other things (as per CPython). Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/runtime.h')
-rw-r--r--py/runtime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.h b/py/runtime.h
index d57c25c92..9b99e594b 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -198,6 +198,7 @@ NORETURN void mp_raise_NotImplementedError(mp_rom_error_text_t msg);
NORETURN void mp_raise_type_arg(const mp_obj_type_t *exc_type, mp_obj_t arg);
NORETURN void mp_raise_StopIteration(mp_obj_t arg);
+NORETURN void mp_raise_TypeError_int_conversion(mp_const_obj_t arg);
NORETURN void mp_raise_OSError(int errno_);
NORETURN void mp_raise_OSError_with_filename(int errno_, const char *filename);
NORETURN void mp_raise_recursion_depth(void);