summaryrefslogtreecommitdiff
path: root/py/objint.h
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-05-12 00:10:53 -0400
committerDan Halbert <halbert@halwitz.org>2019-05-12 00:10:53 -0400
commitd103ac1d6325a075be3fafe812858584435f3144 (patch)
tree63eb217d1e687d44f081b15e94cb731ca0ba472d /py/objint.h
parent36e2faf8d2212a30974cf7069075053ad8af28d0 (diff)
Handle truth values; speed up smallint checks
Diffstat (limited to 'py/objint.h')
-rw-r--r--py/objint.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/objint.h b/py/objint.h
index 654404ac9..e8c9bc3e0 100644
--- a/py/objint.h
+++ b/py/objint.h
@@ -53,7 +53,12 @@ char *mp_obj_int_formatted(char **buf, size_t *buf_size, size_t *fmt_size, mp_co
int base, const char *prefix, char base_char, char comma);
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);
+#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
void mp_obj_int_buffer_overflow_check(mp_obj_t self_in, size_t nbytes, bool is_signed);
+#endif
+
+void mp_small_int_buffer_overflow_check(mp_int_t val, size_t nbytes, bool is_signed);
+
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);