summaryrefslogtreecommitdiff
path: root/py/mpprint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-11-27 12:19:25 +0000
committerDamien George <damien.p.george@gmail.com>2015-11-29 14:25:04 +0000
commit4e7107a572b55321f3f483f0293dd19b4f752c9b (patch)
tree5cd4068be944446d225fac50688555128f736a38 /py/mpprint.c
parentfad7d9317b47330533ee6c84ffdaa3e53ad76e46 (diff)
py: Change mp_print_strn_t func type to use size_t for the str length.
Diffstat (limited to 'py/mpprint.c')
-rw-r--r--py/mpprint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/mpprint.c b/py/mpprint.c
index 0aecf5c56..6b1f8b913 100644
--- a/py/mpprint.c
+++ b/py/mpprint.c
@@ -43,7 +43,7 @@
static const char pad_spaces[] = " ";
static const char pad_zeroes[] = "0000000000000000";
-STATIC void plat_print_strn(void *env, const char *str, mp_uint_t len) {
+STATIC void plat_print_strn(void *env, const char *str, size_t len) {
(void)env;
MP_PLAT_PRINT_STRN(str, len);
}
@@ -51,14 +51,14 @@ STATIC void plat_print_strn(void *env, const char *str, mp_uint_t len) {
const mp_print_t mp_plat_print = {NULL, plat_print_strn};
int mp_print_str(const mp_print_t *print, const char *str) {
- mp_uint_t len = strlen(str);
+ size_t len = strlen(str);
if (len) {
print->print_strn(print->data, str, len);
}
return len;
}
-int mp_print_strn(const mp_print_t *print, const char *str, mp_uint_t len, int flags, char fill, int width) {
+int mp_print_strn(const mp_print_t *print, const char *str, size_t len, int flags, char fill, int width) {
int left_pad = 0;
int right_pad = 0;
int pad = width - len;