summaryrefslogtreecommitdiffstatshomepage
path: root/unix/modsocket.c
diff options
context:
space:
mode:
authorAntonin ENFRUN <antonin.e@me.com>2014-05-12 00:21:50 +0200
committerAntonin ENFRUN <antonin.e@me.com>2014-05-12 09:06:18 +0200
commitda1fffaa093d2541f7374a7aaf16d2f00ed29ddc (patch)
treec5060041368b8c74678f8ae0609f4a15379b2319 /unix/modsocket.c
parentceac71f1f54220d64c87a0c2ebfd583ea49ca037 (diff)
downloadmicropython-da1fffaa093d2541f7374a7aaf16d2f00ed29ddc.tar.gz
micropython-da1fffaa093d2541f7374a7aaf16d2f00ed29ddc.zip
Fix some unused variables, and silence a clang warning about initialization override in vmentrytable.h
Diffstat (limited to 'unix/modsocket.c')
-rw-r--r--unix/modsocket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/modsocket.c b/unix/modsocket.c
index 72aee95eab..131d9285e4 100644
--- a/unix/modsocket.c
+++ b/unix/modsocket.c
@@ -291,6 +291,7 @@ STATIC const mp_obj_type_t microsocket_type = {
.locals_dict = (mp_obj_t)&microsocket_locals_dict,
};
+#if MICROPY_SOCKET_EXTRA
STATIC mp_obj_t mod_socket_htons(mp_obj_t arg) {
return MP_OBJ_NEW_SMALL_INT((machine_int_t)htons(MP_OBJ_SMALL_INT_VALUE(arg)));
}
@@ -308,7 +309,6 @@ STATIC mp_obj_t mod_socket_inet_aton(mp_obj_t arg) {
}
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, &mp_type_str));
const char *s = mp_obj_str_get_str(arg);
@@ -321,7 +321,7 @@ STATIC mp_obj_t mod_socket_gethostbyname(mp_obj_t arg) {
return mp_obj_new_int(*(int*)*h->h_addr_list);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_gethostbyname_obj, mod_socket_gethostbyname);
-#endif
+#endif // MICROPY_SOCKET_EXTRA
STATIC mp_obj_t mod_socket_getaddrinfo(uint n_args, const mp_obj_t *args) {
// TODO: Implement all args