[pypy-commit] pypy msvcrt-cffi: fixes
arigo
pypy.commits at gmail.com
Sun Jul 17 07:08:00 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: msvcrt-cffi
Changeset: r85736:74ab37ebe16d
Date: 2016-07-17 13:09 +0200
http://bitbucket.org/pypy/pypy/changeset/74ab37ebe16d/
Log: fixes
diff --git a/lib_pypy/_subprocess.py b/lib_pypy/_subprocess.py
--- a/lib_pypy/_subprocess.py
+++ b/lib_pypy/_subprocess.py
@@ -35,14 +35,14 @@
def Detach(self):
h = int(self)
if h != -1:
- _ffi.gc(None, self.c_handle)
+ _ffi.gc(self.c_handle, None)
self.c_handle = _INVALID_HANDLE_VALUE
return h
def Close(self):
if int(self) != -1:
_kernel32.CloseHandle(self.c_handle)
- _ffi.gc(None, self.c_handle)
+ _ffi.gc(self.c_handle, None)
self.c_handle = _INVALID_HANDLE_VALUE
def CreatePipe(attributes, size):
@@ -108,7 +108,7 @@
if not res:
raise _WinError()
- return _handle(pi.hProcess), _handle(pi.hThread), pi.dwProcessID, pi.dwThreadID
+ return _handle(pi.hProcess), _handle(pi.hThread), pi.dwProcessId, pi.dwThreadId
def WaitForSingleObject(handle, milliseconds):
res = _kernel32.WaitForSingleObject(int(handle), milliseconds)
@@ -145,7 +145,7 @@
return None
else:
# note: returns integer, not handle object
- return res
+ return int(_handle(res))
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
More information about the pypy-commit
mailing list