summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/file.c4
-rw-r--r--unix/input.c2
-rw-r--r--unix/modffi.c4
-rw-r--r--unix/modos.c4
-rw-r--r--unix/modsocket.c14
-rw-r--r--unix/modtime.c2
-rw-r--r--unix/moduselect.c6
7 files changed, 18 insertions, 18 deletions
diff --git a/unix/file.c b/unix/file.c
index 751d62fd51..2d3eb7b5a2 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -130,7 +130,7 @@ STATIC mp_obj_t fdfile_close(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_close_obj, fdfile_close);
-STATIC mp_obj_t fdfile___exit__(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t fdfile___exit__(size_t n_args, const mp_obj_t *args) {
(void)n_args;
return fdfile_close(args[0]);
}
@@ -264,7 +264,7 @@ const mp_obj_type_t mp_type_textio = {
};
// Factory function for I/O stream classes
-mp_obj_t mp_builtin_open(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
+mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
// TODO: analyze buffering args and instantiate appropriate type
mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS];
mp_arg_parse_all(n_args, args, kwargs, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals);
diff --git a/unix/input.c b/unix/input.c
index 66b3314c98..15ee60e750 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(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mp_builtin_input(size_t n_args, const mp_obj_t *args) {
if (n_args == 1) {
mp_obj_print(args[0], PRINT_STR);
}
diff --git a/unix/modffi.c b/unix/modffi.c
index be12974979..337f7a7b7c 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -208,7 +208,7 @@ STATIC mp_obj_t make_func(mp_obj_t rettype_in, void *func, mp_obj_t argtypes_in)
return MP_OBJ_FROM_PTR(o);
}
-STATIC mp_obj_t ffimod_func(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t ffimod_func(size_t n_args, const mp_obj_t *args) {
(void)n_args; // always 4
mp_obj_ffimod_t *self = MP_OBJ_TO_PTR(args[0]);
const char *symname = mp_obj_str_get_str(args[2]);
@@ -477,7 +477,7 @@ STATIC const mp_obj_type_t opaque_type = {
};
*/
-STATIC mp_obj_t mod_ffi_open(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_ffi_open(size_t n_args, const mp_obj_t *args) {
return ffimod_make_new((mp_obj_t)&ffimod_type, n_args, 0, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_ffi_open_obj, 1, 2, mod_ffi_open);
diff --git a/unix/modos.c b/unix/modos.c
index ee61ad3f38..f6b3f0b97b 100644
--- a/unix/modos.c
+++ b/unix/modos.c
@@ -193,7 +193,7 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
return MP_OBJ_FROM_PTR(t);
}
-STATIC mp_obj_t mod_os_ilistdir(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_os_ilistdir(size_t n_args, const mp_obj_t *args) {
const char *path = ".";
if (n_args > 0) {
path = mp_obj_str_get_str(args[0]);
@@ -206,7 +206,7 @@ STATIC mp_obj_t mod_os_ilistdir(mp_uint_t n_args, const mp_obj_t *args) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_os_ilistdir_obj, 0, 1, mod_os_ilistdir);
-STATIC mp_obj_t mod_os_errno(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_os_errno(size_t n_args, const mp_obj_t *args) {
if (n_args == 0) {
return MP_OBJ_NEW_SMALL_INT(errno);
}
diff --git a/unix/modsocket.c b/unix/modsocket.c
index 0857d05733..a9bb2e09ce 100644
--- a/unix/modsocket.c
+++ b/unix/modsocket.c
@@ -171,7 +171,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(socket_accept_obj, socket_accept);
// Note: besides flag param, this differs from read() in that
// this does not swallow blocking errors (EAGAIN, EWOULDBLOCK) -
// these would be thrown as exceptions.
-STATIC mp_obj_t socket_recv(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_recv(size_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
int sz = MP_OBJ_SMALL_INT_VALUE(args[1]);
int flags = 0;
@@ -190,7 +190,7 @@ STATIC mp_obj_t socket_recv(mp_uint_t n_args, const mp_obj_t *args) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_recv_obj, 2, 3, socket_recv);
-STATIC mp_obj_t socket_recvfrom(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_recvfrom(size_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
int sz = MP_OBJ_SMALL_INT_VALUE(args[1]);
int flags = 0;
@@ -220,7 +220,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_recvfrom_obj, 2, 3, socket_rec
// Note: besides flag param, this differs from write() in that
// this does not swallow blocking errors (EAGAIN, EWOULDBLOCK) -
// these would be thrown as exceptions.
-STATIC mp_obj_t socket_send(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_send(size_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
int flags = 0;
@@ -237,7 +237,7 @@ STATIC mp_obj_t socket_send(mp_uint_t n_args, const mp_obj_t *args) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_send_obj, 2, 3, socket_send);
-STATIC mp_obj_t socket_sendto(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_sendto(size_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
int flags = 0;
@@ -258,7 +258,7 @@ STATIC mp_obj_t socket_sendto(mp_uint_t n_args, const mp_obj_t *args) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_sendto_obj, 3, 4, socket_sendto);
-STATIC mp_obj_t socket_setsockopt(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_setsockopt(size_t n_args, const mp_obj_t *args) {
(void)n_args; // always 4
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
int level = MP_OBJ_SMALL_INT_VALUE(args[1]);
@@ -299,7 +299,7 @@ STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_setblocking_obj, socket_setblocking);
-STATIC mp_obj_t socket_makefile(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_makefile(size_t n_args, const mp_obj_t *args) {
// TODO: CPython explicitly says that closing returned object doesn't close
// the original socket (Python2 at all says that fd is dup()ed). But we
// save on the bloat.
@@ -421,7 +421,7 @@ STATIC mp_obj_t mod_socket_inet_pton(mp_obj_t family_in, mp_obj_t addr_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_socket_inet_pton_obj, mod_socket_inet_pton);
-STATIC mp_obj_t mod_socket_getaddrinfo(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_socket_getaddrinfo(size_t n_args, const mp_obj_t *args) {
// TODO: Implement all args
assert(n_args >= 2 && n_args <= 4);
assert(MP_OBJ_IS_STR(args[0]));
diff --git a/unix/modtime.c b/unix/modtime.c
index 32a4a6c71f..d3b780790c 100644
--- a/unix/modtime.c
+++ b/unix/modtime.c
@@ -154,7 +154,7 @@ STATIC mp_obj_t mod_time_sleep_us(mp_obj_t arg) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_time_sleep_us_obj, mod_time_sleep_us);
-STATIC mp_obj_t mod_time_strftime(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_time_strftime(size_t n_args, const mp_obj_t *args) {
time_t t;
if (n_args == 1) {
t = time(NULL);
diff --git a/unix/moduselect.c b/unix/moduselect.c
index 7e0ec049f1..13cb3f1fa8 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(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t poll_register(size_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(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t poll_poll(size_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)
@@ -186,7 +186,7 @@ STATIC const mp_obj_type_t mp_type_poll = {
.locals_dict = (void*)&poll_locals_dict,
};
-STATIC mp_obj_t select_poll(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t select_poll(size_t n_args, const mp_obj_t *args) {
int alloc = 4;
if (n_args > 0) {
alloc = mp_obj_get_int(args[0]);