py/nativeglue: Add float new/get functions with both single and double.

This commit is contained in:
Damien George
2019-11-30 23:02:50 +11:00
parent 9ac949cdbd
commit ff58961944
2 changed files with 50 additions and 0 deletions

View File

@@ -150,6 +150,10 @@ typedef struct _mp_fun_table_t {
mp_obj_t (*obj_new_str)(const char* data, size_t len);
mp_obj_t (*obj_new_bytes)(const byte* data, size_t len);
mp_obj_t (*obj_new_bytearray_by_ref)(size_t n, void *items);
mp_obj_t (*obj_new_float_from_f)(float f);
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 (*get_buffer_raise)(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);
const mp_print_t *plat_print;