diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-01-21 20:14:18 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-01-21 20:14:18 +0300 |
commit | bec7bfb29d76f995dbf223c20f5d04ae1e33cee6 (patch) | |
tree | f44914a3ee66ef924f15f477f0fc87ade4a06c5d /py/objint.h | |
parent | 1b42f5251fb126496584e2fc61fad12bca7f7152 (diff) |
py/objint: from_bytes(): Implement "byteorder" param and arbitrary precision.
If result guaranteedly fits in a small int, it is handled in objint.c.
Otherwise, it is delegated to mp_obj_int_from_bytes_impl(), which should
be implemented by individual objint_*.c, similar to
mp_obj_int_to_bytes_impl().
Diffstat (limited to 'py/objint.h')
-rw-r--r-- | py/objint.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/objint.h b/py/objint.h index f418c329e..a84a33fa5 100644 --- a/py/objint.h +++ b/py/objint.h @@ -59,6 +59,7 @@ char *mp_obj_int_formatted(char **buf, size_t *buf_size, size_t *fmt_size, mp_co char *mp_obj_int_formatted_impl(char **buf, size_t *buf_size, size_t *fmt_size, mp_const_obj_t self_in, int base, const char *prefix, char base_char, char comma); mp_int_t mp_obj_int_hash(mp_obj_t self_in); +mp_obj_t mp_obj_int_from_bytes_impl(bool big_endian, size_t len, const byte *buf); void mp_obj_int_to_bytes_impl(mp_obj_t self_in, bool big_endian, size_t len, byte *buf); int mp_obj_int_sign(mp_obj_t self_in); mp_obj_t mp_obj_int_abs(mp_obj_t self_in); |