summaryrefslogtreecommitdiffstatshomepage
path: root/py/argcheck.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-30 14:59:21 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-30 14:59:21 +0100
commit4abff7500fb05430a2ce952a2430d4d0ba16047e (patch)
treeb88ab89a41da9d9d71ad95157a4cf9bbaffb11e6 /py/argcheck.c
parent4d91723587b27c5a1da7e759e3f761a16b35d4bd (diff)
downloadmicropython-4abff7500fb05430a2ce952a2430d4d0ba16047e.tar.gz
micropython-4abff7500fb05430a2ce952a2430d4d0ba16047e.zip
py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.
Part of code cleanup, working towards resolving issue #50.
Diffstat (limited to 'py/argcheck.c')
-rw-r--r--py/argcheck.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/argcheck.c b/py/argcheck.c
index 8343d7b279..c8daa60337 100644
--- a/py/argcheck.c
+++ b/py/argcheck.c
@@ -34,7 +34,7 @@
#include "obj.h"
#include "runtime.h"
-void mp_arg_check_num(uint n_args, uint n_kw, uint n_args_min, uint n_args_max, bool takes_kw) {
+void mp_arg_check_num(mp_uint_t n_args, mp_uint_t n_kw, mp_uint_t n_args_min, mp_uint_t n_args_max, bool takes_kw) {
// TODO maybe take the function name as an argument so we can print nicer error messages
if (n_kw && !takes_kw) {
@@ -60,9 +60,9 @@ void mp_arg_check_num(uint n_args, uint n_kw, uint n_args_min, uint n_args_max,
}
}
-void mp_arg_parse_all(uint n_pos, const mp_obj_t *pos, mp_map_t *kws, uint n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals) {
- uint pos_found = 0, kws_found = 0;
- for (uint i = 0; i < n_allowed; i++) {
+void mp_arg_parse_all(mp_uint_t n_pos, const mp_obj_t *pos, mp_map_t *kws, mp_uint_t n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals) {
+ mp_uint_t pos_found = 0, kws_found = 0;
+ for (mp_uint_t i = 0; i < n_allowed; i++) {
mp_obj_t given_arg;
if (i < n_pos) {
if (allowed[i].flags & MP_ARG_KW_ONLY) {
@@ -104,7 +104,7 @@ void mp_arg_parse_all(uint n_pos, const mp_obj_t *pos, mp_map_t *kws, uint n_all
}
}
-void mp_arg_parse_all_kw_array(uint n_pos, uint n_kw, const mp_obj_t *args, uint n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals) {
+void mp_arg_parse_all_kw_array(mp_uint_t n_pos, mp_uint_t n_kw, const mp_obj_t *args, mp_uint_t n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals) {
mp_map_t kw_args;
mp_map_init_fixed_table(&kw_args, n_kw, args + n_pos);
mp_arg_parse_all(n_pos, args, &kw_args, n_allowed, allowed, out_vals);