summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/ffi.c2
-rw-r--r--unix/mpconfigport.mk2
-rw-r--r--unix/socket.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/unix/ffi.c b/unix/ffi.c
index a25e54b54a..d42e4d0928 100644
--- a/unix/ffi.c
+++ b/unix/ffi.c
@@ -254,7 +254,7 @@ mp_obj_t ffifunc_call(mp_obj_t self_in, uint n_args, uint n_kw, const mp_obj_t *
values[i] = 0;
} else if (MP_OBJ_IS_INT(a)) {
values[i] = mp_obj_int_get(a);
- } else if (MP_OBJ_IS_STR(a) || MP_OBJ_IS_TYPE(a, &bytes_type)) {
+ } else if (MP_OBJ_IS_STR(a) || MP_OBJ_IS_TYPE(a, &mp_type_bytes)) {
const char *s = mp_obj_str_get_str(a);
values[i] = (ffi_arg)s;
} else if (MP_OBJ_IS_TYPE(a, &fficallback_type)) {
diff --git a/unix/mpconfigport.mk b/unix/mpconfigport.mk
index d30be8b986..bfb01a71f1 100644
--- a/unix/mpconfigport.mk
+++ b/unix/mpconfigport.mk
@@ -7,4 +7,4 @@ MICROPY_USE_READLINE = 1
MICROPY_MOD_TIME = 1
# ffi module requires libffi (libffi-dev Debian package)
-MICROPY_MOD_FFI = 0
+MICROPY_MOD_FFI = 1
diff --git a/unix/socket.c b/unix/socket.c
index 3125544282..04c1d10c73 100644
--- a/unix/socket.c
+++ b/unix/socket.c
@@ -261,7 +261,7 @@ static mp_obj_t mod_socket_htons(mp_obj_t arg) {
static MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_htons_obj, mod_socket_htons);
static mp_obj_t mod_socket_inet_aton(mp_obj_t arg) {
- assert(MP_OBJ_IS_TYPE(arg, &str_type));
+ assert(MP_OBJ_IS_TYPE(arg, &mp_type_str));
const char *s = mp_obj_str_get_str(arg);
struct in_addr addr;
if (!inet_aton(s, &addr)) {
@@ -274,7 +274,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_inet_aton_obj, mod_socket_inet_aton)
#if MICROPY_SOCKET_EXTRA
static mp_obj_t mod_socket_gethostbyname(mp_obj_t arg) {
- assert(MP_OBJ_IS_TYPE(arg, &str_type));
+ assert(MP_OBJ_IS_TYPE(arg, &mp_type_str));
const char *s = mp_obj_str_get_str(arg);
struct hostent *h = gethostbyname(s);
if (h == NULL) {