|
30 | 30 | #include "py/misc.h"
|
31 | 31 | #include "py/qstr.h"
|
32 | 32 | #include "py/mpprint.h"
|
| 33 | +#include "py/runtime0.h" |
33 | 34 |
|
34 | 35 | // This is the definition of the opaque MicroPython object type.
|
35 | 36 | // All concrete objects have an encoding within this type and the
|
@@ -429,8 +430,8 @@ typedef struct _mp_obj_iter_buf_t {
|
429 | 430 | typedef void (*mp_print_fun_t)(const mp_print_t *print, mp_obj_t o, mp_print_kind_t kind);
|
430 | 431 | typedef mp_obj_t (*mp_make_new_fun_t)(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args);
|
431 | 432 | typedef mp_obj_t (*mp_call_fun_t)(mp_obj_t fun, size_t n_args, size_t n_kw, const mp_obj_t *args);
|
432 |
| -typedef mp_obj_t (*mp_unary_op_fun_t)(mp_uint_t op, mp_obj_t); |
433 |
| -typedef mp_obj_t (*mp_binary_op_fun_t)(mp_uint_t op, mp_obj_t, mp_obj_t); |
| 433 | +typedef mp_obj_t (*mp_unary_op_fun_t)(mp_unary_op_t op, mp_obj_t); |
| 434 | +typedef mp_obj_t (*mp_binary_op_fun_t)(mp_binary_op_t op, mp_obj_t, mp_obj_t); |
434 | 435 | typedef void (*mp_attr_fun_t)(mp_obj_t self_in, qstr attr, mp_obj_t *dest);
|
435 | 436 | typedef mp_obj_t (*mp_subscr_fun_t)(mp_obj_t self_in, mp_obj_t index, mp_obj_t value);
|
436 | 437 | typedef mp_obj_t (*mp_getiter_fun_t)(mp_obj_t self_in, mp_obj_iter_buf_t *iter_buf);
|
@@ -694,7 +695,7 @@ mp_obj_t mp_obj_id(mp_obj_t o_in);
|
694 | 695 | mp_obj_t mp_obj_len(mp_obj_t o_in);
|
695 | 696 | mp_obj_t mp_obj_len_maybe(mp_obj_t o_in); // may return MP_OBJ_NULL
|
696 | 697 | mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t val);
|
697 |
| -mp_obj_t mp_generic_unary_op(mp_uint_t op, mp_obj_t o_in); |
| 698 | +mp_obj_t mp_generic_unary_op(mp_unary_op_t op, mp_obj_t o_in); |
698 | 699 |
|
699 | 700 | // cell
|
700 | 701 | mp_obj_t mp_obj_cell_get(mp_obj_t self_in);
|
@@ -734,11 +735,11 @@ mp_int_t mp_float_hash(mp_float_t val);
|
734 | 735 | #else
|
735 | 736 | static inline mp_int_t mp_float_hash(mp_float_t val) { return (mp_int_t)val; }
|
736 | 737 | #endif
|
737 |
| -mp_obj_t mp_obj_float_binary_op(mp_uint_t op, mp_float_t lhs_val, mp_obj_t rhs); // can return MP_OBJ_NULL if op not supported |
| 738 | +mp_obj_t mp_obj_float_binary_op(mp_binary_op_t op, mp_float_t lhs_val, mp_obj_t rhs); // can return MP_OBJ_NULL if op not supported |
738 | 739 |
|
739 | 740 | // complex
|
740 | 741 | void mp_obj_complex_get(mp_obj_t self_in, mp_float_t *real, mp_float_t *imag);
|
741 |
| -mp_obj_t mp_obj_complex_binary_op(mp_uint_t op, mp_float_t lhs_real, mp_float_t lhs_imag, mp_obj_t rhs_in); // can return MP_OBJ_NULL if op not supported |
| 742 | +mp_obj_t mp_obj_complex_binary_op(mp_binary_op_t op, mp_float_t lhs_real, mp_float_t lhs_imag, mp_obj_t rhs_in); // can return MP_OBJ_NULL if op not supported |
742 | 743 | #else
|
743 | 744 | #define mp_obj_is_float(o) (false)
|
744 | 745 | #endif
|
|
0 commit comments