Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r94875:cad71ec84cef
Date: 2018-07-18 16:38 +0200
http://bitbucket.org/pypy/pypy/changeset/cad71ec84cef/
Log: Start to debug 'multiprocessing' on win32, but found out that
'_winapi.py' is not complete at all.
diff --git a/lib_pypy/_winapi.py b/lib_pypy/_winapi.py
--- a/lib_pypy/_winapi.py
+++ b/lib_pypy/_winapi.py
@@ -98,9 +98,11 @@
def GetOverlappedResult(self, wait):
transferred = _ffi.new('DWORD[1]', [0])
res = _kernel32.GetOverlappedResult(self.handle, self.overlapped,
transferred, wait != 0)
- if not res:
- res = GetLastError()
- if res in (ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_OPERATION_ABORTED):
+ if res:
+ err = ERROR_SUCCESS
+ else:
+ err = GetLastError()
+ if err in (ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_OPERATION_ABORTED):
self.completed = 1
self.pending = 0
elif res == ERROR_IO_INCOMPLETE:
@@ -133,7 +135,7 @@
assert success == 0
err = _kernel32.GetLastError()
if err == ERROR_IO_PENDING:
- overlapped[0].pending = 1
+ ov.pending = 1
elif err == ERROR_PIPE_CONNECTED:
_kernel32.SetEvent(ov.overlapped[0].hEvent)
else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit