[pypy-svn] r62036 - pypy/trunk/pypy/module/_winreg

afa at codespeak.net afa at codespeak.net
Fri Feb 20 00:29:02 CET 2009


Author: afa
Date: Fri Feb 20 00:29:01 2009
New Revision: 62036

Modified:
   pypy/trunk/pypy/module/_winreg/interp_winreg.py
Log:
"space.wrap(tuple) forbidden; use newtuple()"


Modified: pypy/trunk/pypy/module/_winreg/interp_winreg.py
==============================================================================
--- pypy/trunk/pypy/module/_winreg/interp_winreg.py	(original)
+++ pypy/trunk/pypy/module/_winreg/interp_winreg.py	Fri Feb 20 00:29:01 2009
@@ -8,7 +8,8 @@
 
 def raiseWindowsError(space, errcode, context):
     message = rwin32.FormatError(errcode)
-    raise OperationError(space.w_WindowsError, space.wrap((errcode, message)))
+    raise OperationError(space.w_WindowsError,
+                         space.newtuple([errcode, message]))
 
 class W_HKEY(Wrappable):
     def __init__(self, hkey):
@@ -418,11 +419,11 @@
                                               retType, databuf, retDataSize)
                 if ret != 0:
                     raiseWindowsError(space, ret, 'RegQueryValueEx')
-                return space.wrap((
+                return space.newtuple([
                     convert_from_regdata(space, databuf,
                                          retDataSize[0], retType[0]),
                     retType[0],
-                    ))
+                    ])
             finally:
                 lltype.free(retType, flavor='raw')
         finally:
@@ -551,12 +552,12 @@
                         if ret != 0:
                             raiseWindowsError(space, ret, 'RegEnumValue')
 
-                        return space.wrap((
+                        return space.newtuple([
                             rffi.charp2str(valuebuf),
                             convert_from_regdata(space, databuf,
                                                  retDataSize[0], retType[0]),
                             retType[0],
-                            ))
+                            ])
                     finally:
                         lltype.free(retType, flavor='raw')
                 finally:
@@ -628,7 +629,7 @@
                     raiseWindowsError(space, ret, 'RegQueryInfoKey')
                 l = (ft[0].c_dwLowDateTime +
                      (ft[0].c_dwHighDateTime << 32))
-                return space.wrap((nSubKeys[0], nValues[0], l))
+                return space.newtuple([nSubKeys[0], nValues[0], l])
             finally:
                 lltype.free(ft, flavor='raw')
         finally:



More information about the Pypy-commit mailing list