summaryrefslogtreecommitdiff
path: root/py/parsenumbase.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-03-14 22:34:03 +0000
committerDamien George <damien.p.george@gmail.com>2016-03-14 22:34:03 +0000
commitdddb98db8b7544db0248843ad2450a7177adac4a (patch)
tree50c3b5e017dffb41cd10edd223e9503a43db0fd3 /py/parsenumbase.c
parent99fc0d120a139a1525384663552b568fab6215e2 (diff)
py/parsenum: Use size_t to count bytes, and int for type of base arg.
size_t is the proper type to count number of bytes in a string. The base argument does not need to be a full mp_uint_t, int is enough.
Diffstat (limited to 'py/parsenumbase.c')
-rw-r--r--py/parsenumbase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/parsenumbase.c b/py/parsenumbase.c
index 31e4a9164..8d057af18 100644
--- a/py/parsenumbase.c
+++ b/py/parsenumbase.c
@@ -28,7 +28,7 @@
// find real radix base, and strip preceding '0x', '0o' and '0b'
// puts base in *base, and returns number of bytes to skip the prefix
-mp_uint_t mp_parse_num_base(const char *str, mp_uint_t len, mp_uint_t *base) {
+size_t mp_parse_num_base(const char *str, size_t len, int *base) {
const byte *p = (const byte*)str;
if (len <= 1) {
goto no_prefix;