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>
This commit is contained in:
David Lechner
2022-12-27 16:30:05 -06:00
committed by Damien George
parent 53cb073571
commit eaccaa3677
9 changed files with 16 additions and 39 deletions

View File

@@ -47,8 +47,7 @@ MP_DEFINE_CONST_OBJ_TYPE(
mp_type_NoneType,
MP_QSTR_NoneType,
MP_TYPE_FLAG_NONE,
print, none_print,
unary_op, mp_generic_unary_op
print, none_print
);
#if !MICROPY_OBJ_IMMEDIATE_OBJS