diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:54:01 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:54:01 +0000 |
commit | eabdf6718a8d9d10c810b8cd440b82a11d517205 (patch) | |
tree | 955749df1f3f5ba17d5dac9fc742606dc5d0794a /py/obj.h | |
parent | 8138205bea96afb6b59e3147fbaab754cb218ea2 (diff) | |
download | micropython-eabdf6718a8d9d10c810b8cd440b82a11d517205.tar.gz micropython-eabdf6718a8d9d10c810b8cd440b82a11d517205.zip |
py: Add function to convert long int to float.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -330,6 +330,9 @@ void mp_obj_cell_set(mp_obj_t self_in, mp_obj_t obj); extern const mp_obj_type_t int_type; // For long int, returns value truncated to machine_int_t machine_int_t mp_obj_int_get(mp_obj_t self_in); +#if MICROPY_ENABLE_FLOAT +mp_float_t mp_obj_int_as_float(mp_obj_t self_in); +#endif // Will rains exception if value doesn't fit into machine_int_t machine_int_t mp_obj_int_get_checked(mp_obj_t self_in); |