summaryrefslogtreecommitdiffstats
path: root/Modules/overlapped.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/overlapped.c')
-rw-r--r--Modules/overlapped.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index a16797c..df6282c 100644
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -670,7 +670,6 @@ make_ipv4_addr(const struct sockaddr_in *addr)
return PyUnicode_FromString(buf);
}
-#ifdef ENABLE_IPV6
/* Convert IPv6 sockaddr to a Python str. */
static PyObject *
@@ -683,7 +682,6 @@ make_ipv6_addr(const struct sockaddr_in6 *addr)
}
return PyUnicode_FromString(buf);
}
-#endif
static PyObject*
unparse_address(LPSOCKADDR Address, DWORD Length)
@@ -701,7 +699,6 @@ unparse_address(LPSOCKADDR Address, DWORD Length)
}
return ret;
}
-#ifdef ENABLE_IPV6
case AF_INET6: {
const struct sockaddr_in6 *a = (const struct sockaddr_in6 *)Address;
PyObject *addrobj = make_ipv6_addr(a);
@@ -716,9 +713,9 @@ unparse_address(LPSOCKADDR Address, DWORD Length)
}
return ret;
}
-#endif /* ENABLE_IPV6 */
default: {
- return SetFromWindowsErr(ERROR_INVALID_PARAMETER);
+ PyErr_SetString(PyExc_ValueError, "recvfrom returned unsupported address family");
+ return NULL;
}
}
}