summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/file.c6
-rw-r--r--unix/modffi.c8
-rw-r--r--unix/modsocket.c12
3 files changed, 13 insertions, 13 deletions
diff --git a/unix/file.c b/unix/file.c
index 76a44e187c..26c5be9c1b 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -106,7 +106,7 @@ STATIC mp_obj_t fdfile_close(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_close_obj, fdfile_close);
-mp_obj_t fdfile___exit__(uint n_args, const mp_obj_t *args) {
+mp_obj_t fdfile___exit__(mp_uint_t n_args, const mp_obj_t *args) {
return fdfile_close(args[0]);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(fdfile___exit___obj, 4, 4, fdfile___exit__);
@@ -118,7 +118,7 @@ STATIC mp_obj_t fdfile_fileno(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_fileno_obj, fdfile_fileno);
-STATIC mp_obj_t fdfile_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t fdfile_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
mp_obj_fdfile_t *o = m_new_obj(mp_obj_fdfile_t);
mp_const_obj_t type = type_in;
@@ -224,7 +224,7 @@ const mp_obj_type_t mp_type_textio = {
};
// Factory function for I/O stream classes
-mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args) {
+mp_obj_t mp_builtin_open(mp_uint_t n_args, const mp_obj_t *args) {
// TODO: analyze mode and buffering args and instantiate appropriate type
return fdfile_make_new((mp_obj_t)&mp_type_textio, n_args, 0, args);
}
diff --git a/unix/modffi.c b/unix/modffi.c
index 842ed3370e..b5ab35e7c4 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -172,7 +172,7 @@ STATIC mp_obj_t ffimod_close(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(ffimod_close_obj, ffimod_close);
-STATIC mp_obj_t ffimod_func(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t ffimod_func(mp_uint_t n_args, const mp_obj_t *args) {
mp_obj_ffimod_t *self = args[0];
const char *rettype = mp_obj_str_get_str(args[1]);
const char *symname = mp_obj_str_get_str(args[2]);
@@ -264,7 +264,7 @@ STATIC mp_obj_t ffimod_var(mp_obj_t self_in, mp_obj_t vartype_in, mp_obj_t symna
}
MP_DEFINE_CONST_FUN_OBJ_3(ffimod_var_obj, ffimod_var);
-STATIC mp_obj_t ffimod_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t ffimod_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
const char *fname = mp_obj_str_get_str(args[0]);
void *mod = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
@@ -300,7 +300,7 @@ STATIC void ffifunc_print(void (*print)(void *env, const char *fmt, ...), void *
print(env, "<ffifunc %p>", self->func);
}
-mp_obj_t ffifunc_call(mp_obj_t self_in, uint n_args, uint n_kw, const mp_obj_t *args) {
+mp_obj_t ffifunc_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
mp_obj_ffifunc_t *self = self_in;
assert(n_kw == 0);
assert(n_args == self->cif.nargs);
@@ -406,7 +406,7 @@ STATIC const mp_obj_type_t opaque_type = {
};
*/
-mp_obj_t mod_ffi_open(uint n_args, const mp_obj_t *args) {
+mp_obj_t mod_ffi_open(mp_uint_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/modsocket.c b/unix/modsocket.c
index 7eae1d8bf9..be97441af2 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(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_recv(mp_uint_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = args[0];
int sz = MP_OBJ_SMALL_INT_VALUE(args[1]);
int flags = 0;
@@ -193,7 +193,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_recv_obj, 2, 3, socket_recv);
// 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(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_send(mp_uint_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = args[0];
int flags = 0;
@@ -210,7 +210,7 @@ STATIC mp_obj_t socket_send(uint 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_setsockopt(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_setsockopt(mp_uint_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = args[0];
int level = MP_OBJ_SMALL_INT_VALUE(args[1]);
int option = mp_obj_get_int(args[2]);
@@ -249,7 +249,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(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t socket_makefile(mp_uint_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.
@@ -261,7 +261,7 @@ STATIC mp_obj_t socket_makefile(uint n_args, const mp_obj_t *args) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile);
-STATIC mp_obj_t socket_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t socket_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
int family = AF_INET;
int type = SOCK_STREAM;
int proto = 0;
@@ -352,7 +352,7 @@ STATIC mp_obj_t mod_socket_gethostbyname(mp_obj_t arg) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_gethostbyname_obj, mod_socket_gethostbyname);
#endif // MICROPY_SOCKET_EXTRA
-STATIC mp_obj_t mod_socket_getaddrinfo(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_socket_getaddrinfo(mp_uint_t n_args, const mp_obj_t *args) {
// TODO: Implement all args
assert(n_args == 2);
assert(MP_OBJ_IS_STR(args[0]));