[pypy-commit] pypy default: Get/SetLastError should be nowrapper functions, like get/set_errno in

arigo noreply at buildbot.pypy.org
Mon Dec 22 22:08:45 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r75069:40df46ca45b0
Date: 2014-12-22 22:08 +0100
http://bitbucket.org/pypy/pypy/changeset/40df46ca45b0/

Log:	Get/SetLastError should be nowrapper functions, like get/set_errno
	in rposix.py

diff --git a/rpython/rlib/rwin32.py b/rpython/rlib/rwin32.py
--- a/rpython/rlib/rwin32.py
+++ b/rpython/rlib/rwin32.py
@@ -118,8 +118,10 @@
     INVALID_HANDLE_VALUE = rffi.cast(HANDLE, -1)
     PFILETIME = rffi.CArrayPtr(FILETIME)
 
-    _GetLastError = winexternal('GetLastError', [], DWORD, releasegil=False)
-    _SetLastError = winexternal('SetLastError', [DWORD], lltype.Void)
+    _GetLastError = winexternal('GetLastError', [], DWORD,
+                                _nowrapper=True, sandboxsafe=True)
+    _SetLastError = winexternal('SetLastError', [DWORD], lltype.Void,
+                                _nowrapper=True, sandboxsafe=True)
 
     def GetLastError():
         return rffi.cast(lltype.Signed, _GetLastError())


More information about the pypy-commit mailing list