diff options
author | Damien George <damien.p.george@gmail.com> | 2016-01-03 11:53:44 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-01-03 11:53:44 +0000 |
commit | 1b0aab621baf081bf1cbeb38a29bd37fbc135cc7 (patch) | |
tree | 7128cdf6877636c1979e39c6fa925a8bbc649621 /unix | |
parent | 3d2daa2d03e300ac64005b8659c31f04a0f7fd53 (diff) | |
download | micropython-1b0aab621baf081bf1cbeb38a29bd37fbc135cc7.tar.gz micropython-1b0aab621baf081bf1cbeb38a29bd37fbc135cc7.zip |
py: Change struct and macro for builtin fun so they can be type checked.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/input.c | 3 | ||||
-rw-r--r-- | unix/moduselect.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/unix/input.c b/unix/input.c index b2cf8efa8a..66b3314c98 100644 --- a/unix/input.c +++ b/unix/input.c @@ -158,7 +158,7 @@ void prompt_write_history(void) { #endif } -STATIC mp_obj_t mp_builtin_input(uint n_args, const mp_obj_t *args) { +STATIC mp_obj_t mp_builtin_input(mp_uint_t n_args, const mp_obj_t *args) { if (n_args == 1) { mp_obj_print(args[0], PRINT_STR); } @@ -171,5 +171,4 @@ STATIC mp_obj_t mp_builtin_input(uint n_args, const mp_obj_t *args) { free(line); return o; } - MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_input_obj, 0, 1, mp_builtin_input); diff --git a/unix/moduselect.c b/unix/moduselect.c index 537bd47960..7e0ec049f1 100644 --- a/unix/moduselect.c +++ b/unix/moduselect.c @@ -52,7 +52,7 @@ typedef struct _mp_obj_poll_t { } mp_obj_poll_t; /// \method register(obj[, eventmask]) -STATIC mp_obj_t poll_register(uint n_args, const mp_obj_t *args) { +STATIC mp_obj_t poll_register(mp_uint_t n_args, const mp_obj_t *args) { mp_obj_poll_t *self = MP_OBJ_TO_PTR(args[0]); int fd = mp_obj_get_int(args[1]); mp_uint_t flags; @@ -129,7 +129,7 @@ MP_DEFINE_CONST_FUN_OBJ_3(poll_modify_obj, poll_modify); /// \method poll([timeout]) /// Timeout is in milliseconds. -STATIC mp_obj_t poll_poll(uint n_args, const mp_obj_t *args) { +STATIC mp_obj_t poll_poll(mp_uint_t n_args, const mp_obj_t *args) { mp_obj_poll_t *self = MP_OBJ_TO_PTR(args[0]); // work out timeout (it's given already in ms) |