diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-28 14:07:21 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-28 14:07:21 +0100 |
commit | 503d6110338ab2d79e6c0f8f591a0ca6397717de (patch) | |
tree | bb57f7338aa07d248fb17cc6260d1f36c8bb8b86 /py/obj.h | |
parent | 1d567592b18ea9796515436754877aac3948bd29 (diff) | |
download | micropython-503d6110338ab2d79e6c0f8f591a0ca6397717de.tar.gz micropython-503d6110338ab2d79e6c0f8f591a0ca6397717de.zip |
py: Implement long int parsing in int(...).
Addresses issue #627.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -371,7 +371,7 @@ mp_obj_t mp_obj_new_bool(bool value); mp_obj_t mp_obj_new_cell(mp_obj_t obj); mp_obj_t mp_obj_new_int(machine_int_t value); mp_obj_t mp_obj_new_int_from_uint(machine_uint_t value); -mp_obj_t mp_obj_new_int_from_qstr(qstr qst); +mp_obj_t mp_obj_new_int_from_str_len(const char **str, uint len, bool neg, uint base); mp_obj_t mp_obj_new_int_from_ll(long long val); // this must return a multi-precision integer object (or raise an overflow exception) mp_obj_t mp_obj_new_str(const char* data, uint len, bool make_qstr_if_not_already); mp_obj_t mp_obj_new_bytes(const byte* data, uint len); @@ -445,7 +445,7 @@ void mp_obj_cell_set(mp_obj_t self_in, mp_obj_t obj); // int // For long int, returns value truncated to machine_int_t -machine_int_t mp_obj_int_get(mp_obj_t self_in); +machine_int_t mp_obj_int_get(mp_const_obj_t self_in); #if MICROPY_ENABLE_FLOAT mp_float_t mp_obj_int_as_float(mp_obj_t self_in); #endif |