summaryrefslogtreecommitdiffstatshomepage
path: root/py/nativeglue.h
diff options
context:
space:
mode:
authorBrian Pugh <bnp117@gmail.com>2024-04-19 16:37:51 -0700
committerDamien George <damien@micropython.org>2024-05-24 13:50:57 +1000
commitc624a5c0c4d02fd67e2ad5a0f36a141d2a6ef2ff (patch)
tree22ade79dfb47aa3d01fd6fa60c0d2ee0070992c3 /py/nativeglue.h
parenta196468c4752997a11cf06b65cb2147465b7f8eb (diff)
downloadmicropython-c624a5c0c4d02fd67e2ad5a0f36a141d2a6ef2ff.tar.gz
micropython-c624a5c0c4d02fd67e2ad5a0f36a141d2a6ef2ff.zip
py/dynruntime: Export mp_load_method_maybe and mp_arg_parse_all* funcs.
Also define `mp_type_bytearray`. These all help to write native modules. Signed-off-by: Brian Pugh <bnp117@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/nativeglue.h')
-rw-r--r--py/nativeglue.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/py/nativeglue.h b/py/nativeglue.h
index 4c114de421..e96fd7b66a 100644
--- a/py/nativeglue.h
+++ b/py/nativeglue.h
@@ -154,13 +154,16 @@ typedef struct _mp_fun_table_t {
mp_obj_t (*obj_new_float_from_d)(double d);
float (*obj_get_float_to_f)(mp_obj_t o);
double (*obj_get_float_to_d)(mp_obj_t o);
+ void (*load_method_maybe)(mp_obj_t base, qstr attr, mp_obj_t *dest);
bool (*get_buffer)(mp_obj_t obj, mp_buffer_info_t *bufinfo, mp_uint_t flags);
const mp_stream_p_t *(*get_stream_raise)(mp_obj_t self_in, int flags);
+ void (*arg_parse_all)(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals);
+ void (*arg_parse_all_kw_array)(size_t n_pos, size_t n_kw, const mp_obj_t *args, size_t n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals);
size_t (*binary_get_size)(char struct_type, char val_type, size_t *palign);
mp_obj_t (*binary_get_val_array)(char typecode, void *p, size_t index);
void (*binary_set_val_array)(char typecode, void *p, size_t index, mp_obj_t val_in);
const mp_print_t *plat_print;
- // The following entries start at index 70 and are referenced by tools-mpy_ld.py,
+ // The following entries start at index 73 and are referenced by tools-mpy_ld.py,
// see constant MP_FUN_TABLE_MP_TYPE_TYPE_OFFSET.
const mp_obj_type_t *type_type;
const mp_obj_type_t *type_str;