summaryrefslogtreecommitdiffstatshomepage
path: root/extmod
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-03 14:21:40 +0000
committerDamien George <damien.p.george@gmail.com>2016-01-11 00:49:27 +0000
commit4b72b3a133ea87a1ef8b964508dc25c551ccf093 (patch)
treee00ae8b891475f1a5d76bd2401d20a4dfb26e1e1 /extmod
parenta0c97814dfcb0debbde8be99539e3d5ca2334e54 (diff)
downloadmicropython-4b72b3a133ea87a1ef8b964508dc25c551ccf093.tar.gz
micropython-4b72b3a133ea87a1ef8b964508dc25c551ccf093.zip
py: Change type signature of builtin funs that take variable or kw args.
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
Diffstat (limited to 'extmod')
-rw-r--r--extmod/modubinascii.c2
-rw-r--r--extmod/modubinascii.h2
-rw-r--r--extmod/modure.c12
-rw-r--r--extmod/moduzlib.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/extmod/modubinascii.c b/extmod/modubinascii.c
index 12cd266870..82f910b0e7 100644
--- a/extmod/modubinascii.c
+++ b/extmod/modubinascii.c
@@ -34,7 +34,7 @@
#include "modubinascii.h"
-mp_obj_t mod_binascii_hexlify(mp_uint_t n_args, const mp_obj_t *args) {
+mp_obj_t mod_binascii_hexlify(size_t n_args, const mp_obj_t *args) {
// Second argument is for an extension to allow a separator to be used
// between values.
const char *sep = NULL;
diff --git a/extmod/modubinascii.h b/extmod/modubinascii.h
index 94e69b18eb..0f9b82c1cb 100644
--- a/extmod/modubinascii.h
+++ b/extmod/modubinascii.h
@@ -27,7 +27,7 @@
#ifndef MICROPY_EXTMOD_MODUBINASCII
#define MICROPY_EXTMOD_MODUBINASCII
-extern mp_obj_t mod_binascii_hexlify(mp_uint_t n_args, const mp_obj_t *args);
+extern mp_obj_t mod_binascii_hexlify(size_t n_args, const mp_obj_t *args);
extern mp_obj_t mod_binascii_unhexlify(mp_obj_t data);
extern mp_obj_t mod_binascii_a2b_base64(mp_obj_t data);
extern mp_obj_t mod_binascii_b2a_base64(mp_obj_t data);
diff --git a/extmod/modure.c b/extmod/modure.c
index 5843569a50..91c97bf8b7 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -115,17 +115,17 @@ STATIC mp_obj_t re_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
return MP_OBJ_FROM_PTR(match);
}
-STATIC mp_obj_t re_match(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t re_match(size_t n_args, const mp_obj_t *args) {
return re_exec(true, n_args, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_match_obj, 2, 4, re_match);
-STATIC mp_obj_t re_search(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t re_search(size_t n_args, const mp_obj_t *args) {
return re_exec(false, n_args, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_search_obj, 2, 4, re_search);
-STATIC mp_obj_t re_split(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
mp_obj_re_t *self = MP_OBJ_TO_PTR(args[0]);
Subject subj;
mp_uint_t len;
@@ -182,7 +182,7 @@ STATIC const mp_obj_type_t re_type = {
.locals_dict = (void*)&re_locals_dict,
};
-STATIC mp_obj_t mod_re_compile(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
const char *re_str = mp_obj_str_get_str(args[0]);
int size = re1_5_sizecode(re_str);
if (size == -1) {
@@ -215,12 +215,12 @@ STATIC mp_obj_t mod_re_exec(bool is_anchored, uint n_args, const mp_obj_t *args)
return match;
}
-STATIC mp_obj_t mod_re_match(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_re_match(size_t n_args, const mp_obj_t *args) {
return mod_re_exec(true, n_args, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_match_obj, 2, 4, mod_re_match);
-STATIC mp_obj_t mod_re_search(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_re_search(size_t n_args, const mp_obj_t *args) {
return mod_re_exec(false, n_args, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_search_obj, 2, 4, mod_re_search);
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c
index 2a07f008f4..3d945abba5 100644
--- a/extmod/moduzlib.c
+++ b/extmod/moduzlib.c
@@ -49,7 +49,7 @@ STATIC int mod_uzlib_grow_buf(TINF_DATA *d, unsigned alloc_req) {
return 0;
}
-STATIC mp_obj_t mod_uzlib_decompress(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
(void)n_args;
mp_obj_t data = args[0];
mp_buffer_info_t bufinfo;