[pypy-commit] pypy py3.6: FormatErrorW returns a tuple text, unicode_len

mattip pypy.commits at gmail.com
Sun Mar 3 12:54:36 EST 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r96205:ce6ce17c04ae
Date: 2019-03-03 19:56 +0200
http://bitbucket.org/pypy/pypy/changeset/ce6ce17c04ae/

Log:	FormatErrorW returns a tuple text, unicode_len

diff --git a/pypy/module/_cffi_backend/cerrno.py b/pypy/module/_cffi_backend/cerrno.py
--- a/pypy/module/_cffi_backend/cerrno.py
+++ b/pypy/module/_cffi_backend/cerrno.py
@@ -27,4 +27,4 @@
     if code == -1:
         code = GetLastError_alt_saved()
     message = FormatErrorW(code)
-    return space.newtuple([space.newint(code), space.newtext(message)])
+    return space.newtuple([space.newint(code), space.newtext(*message)])
diff --git a/pypy/module/_multiprocessing/interp_win32_py3.py b/pypy/module/_multiprocessing/interp_win32_py3.py
--- a/pypy/module/_multiprocessing/interp_win32_py3.py
+++ b/pypy/module/_multiprocessing/interp_win32_py3.py
@@ -9,7 +9,7 @@
     message = rwin32.FormatErrorW(errno)
     w_errcode = space.newint(errno)
     return OperationError(space.w_WindowsError,
-                         space.newtuple([w_errcode, space.newtext(message),
+                         space.newtuple([w_errcode, space.newtext(*message),
                         space.w_None, w_errcode]))
 
 @unwrap_spec(handle=int)
diff --git a/pypy/module/_rawffi/interp_rawffi.py b/pypy/module/_rawffi/interp_rawffi.py
--- a/pypy/module/_rawffi/interp_rawffi.py
+++ b/pypy/module/_rawffi/interp_rawffi.py
@@ -632,7 +632,7 @@
 if _MS_WINDOWS:
     @unwrap_spec(code=int)
     def FormatError(space, code):
-        return space.newtext(rwin32.FormatErrorW(code))
+        return space.newtext(*rwin32.FormatErrorW(code))
 
     @unwrap_spec(hresult=int)
     def check_HRESULT(space, hresult):


More information about the pypy-commit mailing list