diff options
Diffstat (limited to 'py/objint_mpz.c')
-rw-r--r-- | py/objint_mpz.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/objint_mpz.c b/py/objint_mpz.c index 2746f4dffb..369e5af324 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -104,6 +104,12 @@ mp_int_t mp_obj_int_hash(mp_obj_t self_in) { return mpz_hash(&self->mpz); } +void mp_obj_int_to_bytes_impl(mp_obj_t self_in, bool big_endian, mp_uint_t len, byte *buf) { + assert(MP_OBJ_IS_TYPE(self_in, &mp_type_int)); + mp_obj_int_t *self = self_in; + mpz_as_bytes(&self->mpz, big_endian, len, buf); +} + bool mp_obj_int_is_positive(mp_obj_t self_in) { if (MP_OBJ_IS_SMALL_INT(self_in)) { return MP_OBJ_SMALL_INT_VALUE(self_in) >= 0; |