summaryrefslogtreecommitdiff
path: root/py/pfenv.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-07-03 13:25:24 +0100
committerDamien George <damien.p.george@gmail.com>2014-07-03 13:25:24 +0100
commit40f3c026823f8951a2fa04e9c7fc93c75bc27bec (patch)
treec9c8210654c7114f00c5234a8481d9b5fbd28ce0 /py/pfenv.c
parent065aba587571150074ea79483ffa72c0fe6bc8c8 (diff)
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50.
Diffstat (limited to 'py/pfenv.c')
-rw-r--r--py/pfenv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/pfenv.c b/py/pfenv.c
index ca1e3e919..15793ff76 100644
--- a/py/pfenv.c
+++ b/py/pfenv.c
@@ -111,14 +111,14 @@ int pfenv_print_strn(const pfenv_t *pfenv, const char *str, unsigned int len, in
// 32-bits is 10 digits, add 3 for commas, 1 for sign, 1 for terminating null
// We can use 16 characters for 32-bit and 32 characters for 64-bit
-#define INT_BUF_SIZE (sizeof(machine_int_t) * 4)
+#define INT_BUF_SIZE (sizeof(mp_int_t) * 4)
// This function is used by stmhal port to implement printf.
// It needs to be a separate function to pfenv_print_mp_int, since converting to a mp_int looses the MSB.
-int pfenv_print_int(const pfenv_t *pfenv, machine_uint_t x, int sgn, int base, int base_char, int flags, char fill, int width) {
+int pfenv_print_int(const pfenv_t *pfenv, mp_uint_t x, int sgn, int base, int base_char, int flags, char fill, int width) {
char sign = 0;
if (sgn) {
- if ((machine_int_t)x < 0) {
+ if ((mp_int_t)x < 0) {
sign = '-';
x = -x;
} else if (flags & PF_FLAG_SHOW_SIGN) {
@@ -232,7 +232,7 @@ int pfenv_print_mp_int(const pfenv_t *pfenv, mp_obj_t x, int sgn, int base, int
// The size of this buffer is rather arbitrary. If it's not large
// enough, a dynamic one will be allocated.
- char stack_buf[sizeof(machine_int_t) * 4];
+ char stack_buf[sizeof(mp_int_t) * 4];
char *buf = stack_buf;
int buf_size = sizeof(stack_buf);
int fmt_size = 0;