diff options
author | Damien George <damien.p.george@gmail.com> | 2017-08-29 13:04:01 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-08-29 13:16:30 +1000 |
commit | 58321dd9854d71a96e5db2d361e0efc05d9de8cf (patch) | |
tree | 99868b98083b1b25715303ee6f2b62835492ffce /py/obj.c | |
parent | be8e5744e64aec10a3499fd6ea034bbf4be0c871 (diff) |
all: Convert mp_uint_t to mp_unary_op_t/mp_binary_op_t where appropriate
The unary-op/binary-op enums are already defined, and there are no
arithmetic tricks used with these types, so it makes sense to use the
correct enum type for arguments that take these values. It also reduces
code size quite a bit for nan-boxing builds.
Diffstat (limited to 'py/obj.c')
-rw-r--r-- | py/obj.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -505,7 +505,7 @@ void mp_get_buffer_raise(mp_obj_t obj, mp_buffer_info_t *bufinfo, mp_uint_t flag } } -mp_obj_t mp_generic_unary_op(mp_uint_t op, mp_obj_t o_in) { +mp_obj_t mp_generic_unary_op(mp_unary_op_t op, mp_obj_t o_in) { switch (op) { case MP_UNARY_OP_HASH: return MP_OBJ_NEW_SMALL_INT((mp_uint_t)o_in); default: return MP_OBJ_NULL; // op not supported |