py/dynruntime: Add support for float API to make/get floats.

We don't want to add a feature flag to .mpy files that indicate float
support because it will get complex and difficult to use.  Instead the .mpy
is built using whatever precision it chooses (float or double) and the
native glue API will convert between this choice and what the host runtime
actually uses.
This commit is contained in:
Damien George
2019-11-30 23:03:09 +11:00
parent ff58961944
commit abc642973d
3 changed files with 27 additions and 1 deletions

View File

@@ -663,7 +663,7 @@ def link_objects(env, native_qstr_vals_len, native_qstr_objs_len):
# Resolve unknown symbols
mp_fun_table_sec = Section('.external.mp_fun_table', b'', 0)
fun_table = {key: 63 + idx
fun_table = {key: 67 + idx
for idx, key in enumerate([
'mp_type_type',
'mp_type_str',