diff options
author | David Lechner <david@pybricks.com> | 2022-12-27 16:30:05 -0600 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-05-19 12:04:44 +1000 |
commit | eaccaa36771f784dfb458b8ba3591f11513824e6 (patch) | |
tree | 7ecce76ccff90c6b0b4093e830edc7aff0c7d892 /py/objsingleton.c | |
parent | 53cb073571196d2ba7174706d5d784e42e5430cf (diff) |
py/obj: Remove mp_generic_unary_op().
Since converting to variable sized slots in mp_obj_type_t, we can now
reduce the code size a bit by removing mp_generic_unary_op() and the
corresponding slots where it is used. Instead we just implement the
generic `__hash__` operation in the runtime.
Signed-off-by: David Lechner <david@pybricks.com>
Diffstat (limited to 'py/objsingleton.c')
-rw-r--r-- | py/objsingleton.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/py/objsingleton.c b/py/objsingleton.c index dc73d28c2..6537676c5 100644 --- a/py/objsingleton.c +++ b/py/objsingleton.c @@ -45,8 +45,7 @@ STATIC void singleton_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ MP_DEFINE_CONST_OBJ_TYPE( mp_type_singleton, MP_QSTR_, MP_TYPE_FLAG_NONE, - print, singleton_print, - unary_op, mp_generic_unary_op + print, singleton_print ); const mp_obj_singleton_t mp_const_ellipsis_obj = {{&mp_type_singleton}, MP_QSTR_Ellipsis}; |