[pypy-commit] pypy more-rposix: Remove an old workaround that was useful for the cli backend

amauryfa noreply at buildbot.pypy.org
Fri Nov 7 14:52:14 CET 2014


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: more-rposix
Changeset: r74360:8be9ebc6bbbd
Date: 2014-11-06 21:15 +0100
http://bitbucket.org/pypy/pypy/changeset/8be9ebc6bbbd/

Log:	Remove an old workaround that was useful for the cli backend

diff --git a/rpython/rlib/rwin32.py b/rpython/rlib/rwin32.py
--- a/rpython/rlib/rwin32.py
+++ b/rpython/rlib/rwin32.py
@@ -243,7 +243,7 @@
                 buflen -= 1
 
             if buflen <= 0:
-                result = fake_FormatError(code)
+                result = 'Windows Error %d' % (code,)
             else:
                 result = rffi.charpsize2str(s_buf, buflen)
         finally:
@@ -252,9 +252,6 @@
 
         return result
 
-    def fake_FormatError(code):
-        return 'Windows Error %d' % (code,)
-
     def lastWindowsError(context="Windows Error"):
         code = GetLastError()
         return WindowsError(code, context)
diff --git a/rpython/rtyper/module/ll_os.py b/rpython/rtyper/module/ll_os.py
--- a/rpython/rtyper/module/ll_os.py
+++ b/rpython/rtyper/module/ll_os.py
@@ -1799,19 +1799,3 @@
     def getcontroller(self):
         from rpython.rtyper.module.ll_os_environ import OsEnvironController
         return OsEnvironController()
-
-# ____________________________________________________________
-# Support for the WindowsError exception
-
-if sys.platform == 'win32':
-    from rpython.rlib import rwin32
-
-    class RegisterFormatError(BaseLazyRegistering):
-        def __init__(self):
-            pass
-
-        @registering(rwin32.FormatError)
-        def register_rwin32_FormatError(self):
-            return extdef([lltype.Signed], str,
-                          "rwin32_FormatError",
-                          llimpl=rwin32.llimpl_FormatError)


More information about the pypy-commit mailing list