[pypy-commit] pypy winoverlapped: Ensure that WSAStartup is called.
andrewjlawrence
pypy.commits at gmail.com
Sun Mar 17 16:25:32 EDT 2019
Author: andrewjlawrence
Branch: winoverlapped
Changeset: r96335:727888c771e9
Date: 2019-03-17 20:24 +0000
http://bitbucket.org/pypy/pypy/changeset/727888c771e9/
Log: Ensure that WSAStartup is called.
diff --git a/lib_pypy/_overlapped.py b/lib_pypy/_overlapped.py
--- a/lib_pypy/_overlapped.py
+++ b/lib_pypy/_overlapped.py
@@ -111,6 +111,8 @@
def initiailize_function_ptrs():
+ ## importing socket ensures that WSAStartup() is called
+ import _socket
s = _winsock2.socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
dwBytes = _ffi.new("DWORD[1]", [0])
if s == INVALID_SOCKET:
More information about the pypy-commit
mailing list