summaryrefslogtreecommitdiff
path: root/py/mpprint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-07 14:29:12 +0000
committerDamien George <damien.p.george@gmail.com>2016-01-07 14:29:12 +0000
commitd6b31e4578a9f7ed4f970774fe91eeb811b1d475 (patch)
tree9914e2aa40f688617b4f32073f4cca320eebe615 /py/mpprint.c
parent93b3726240ed50aa162d47519d38b1713f93298a (diff)
py: Change mp_obj_int_is_positive to more general mp_obj_int_sign.
This function returns the sign (-1, 0 or 1) of the integer object.
Diffstat (limited to 'py/mpprint.c')
-rw-r--r--py/mpprint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mpprint.c b/py/mpprint.c
index 19575f8a8..206cf2aa5 100644
--- a/py/mpprint.c
+++ b/py/mpprint.c
@@ -217,7 +217,7 @@ int mp_print_mp_int(const mp_print_t *print, mp_obj_t x, int base, int base_char
char prefix_buf[4];
char *prefix = prefix_buf;
- if (mp_obj_int_is_positive(x)) {
+ if (mp_obj_int_sign(x) > 0) {
if (flags & PF_FLAG_SHOW_SIGN) {
*prefix++ = '+';
} else if (flags & PF_FLAG_SPACE_SIGN) {