mirror of
https://github.com/micropython/micropython.git
synced 2026-02-15 07:30:16 +01:00
py/objtuple: Move all tuple helper declarations to objtuple.h.
These helper functions assume their argument is of type `mp_obj_tuple_t` so they have a better home in `py/objtuple.h`. Also remove `mp_obj_tuple_hash()` because it doesn't have a corresponding function defined anywhere (nor is it ever used). Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
5
py/obj.h
5
py/obj.h
@@ -1179,11 +1179,6 @@ mp_obj_t mp_obj_complex_binary_op(mp_binary_op_t op, mp_float_t lhs_real, mp_flo
|
||||
#define mp_obj_is_float(o) (false)
|
||||
#endif
|
||||
|
||||
// tuple
|
||||
void mp_obj_tuple_get(mp_obj_t self_in, size_t *len, mp_obj_t **items);
|
||||
void mp_obj_tuple_del(mp_obj_t self_in);
|
||||
mp_int_t mp_obj_tuple_hash(mp_obj_t self_in);
|
||||
|
||||
// dict
|
||||
typedef struct _mp_obj_dict_t {
|
||||
mp_obj_base_t base;
|
||||
|
||||
@@ -45,6 +45,8 @@ mp_obj_t mp_obj_tuple_unary_op(mp_unary_op_t op, mp_obj_t self_in);
|
||||
mp_obj_t mp_obj_tuple_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs);
|
||||
mp_obj_t mp_obj_tuple_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value);
|
||||
mp_obj_t mp_obj_tuple_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf);
|
||||
void mp_obj_tuple_get(mp_obj_t self_in, size_t *len, mp_obj_t **items);
|
||||
void mp_obj_tuple_del(mp_obj_t self_in);
|
||||
|
||||
extern const mp_obj_type_t mp_type_attrtuple;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user