summaryrefslogtreecommitdiff
path: root/py/objint.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-25 23:16:39 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-25 23:16:39 +0100
commit271d18eb08ec488ee45f8e6cd852e8236074f082 (patch)
treef5ba5d1b28cb48e72334fb079a5d6ef148083970 /py/objint.h
parent7c8b4c1a8b8278d864649c127857e34a6bd29504 (diff)
py: Support conversion of bignum to bytes.
This gets int.to_bytes working for bignum, and also struct.pack with 'q' and 'Q' args on 32-bit machines. Addresses issue #1155.
Diffstat (limited to 'py/objint.h')
-rw-r--r--py/objint.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/objint.h b/py/objint.h
index daeb3c499..09cf7c86d 100644
--- a/py/objint.h
+++ b/py/objint.h
@@ -56,6 +56,7 @@ char *mp_obj_int_formatted(char **buf, mp_uint_t *buf_size, mp_uint_t *fmt_size,
char *mp_obj_int_formatted_impl(char **buf, mp_uint_t *buf_size, mp_uint_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);
+void mp_obj_int_to_bytes_impl(mp_obj_t self_in, bool big_endian, mp_uint_t len, byte *buf);
bool mp_obj_int_is_positive(mp_obj_t self_in);
mp_obj_t mp_obj_int_abs(mp_obj_t self_in);
mp_obj_t mp_obj_int_unary_op(mp_uint_t op, mp_obj_t o_in);