Author: Carl Friedrich Bolz <[email protected]>
Branch: space-newtext
Changeset: r89179:8d63ef70f9e6
Date: 2016-12-19 14:38 +0100
http://bitbucket.org/pypy/pypy/changeset/8d63ef70f9e6/
Log: remove str unwrap_specs in _winreg module
diff --git a/pypy/module/_winreg/interp_winreg.py
b/pypy/module/_winreg/interp_winreg.py
--- a/pypy/module/_winreg/interp_winreg.py
+++ b/pypy/module/_winreg/interp_winreg.py
@@ -149,7 +149,7 @@
if ret != 0:
raiseWindowsError(space, ret, 'RegFlushKey')
-@unwrap_spec(subkey=str, filename=str)
+@unwrap_spec(subkey="text", filename="text")
def LoadKey(space, w_hkey, subkey, filename):
"""LoadKey(key, sub_key, file_name) - Creates a subkey under the specified
key
and stores registration information from a specified file into that subkey.
@@ -173,7 +173,7 @@
if ret != 0:
raiseWindowsError(space, ret, 'RegLoadKey')
-@unwrap_spec(filename=str)
+@unwrap_spec(filename="text")
def SaveKey(space, w_hkey, filename):
"""SaveKey(key, file_name) - Saves the specified key, and all its subkeys
to the specified file.
@@ -192,7 +192,7 @@
if ret != 0:
raiseWindowsError(space, ret, 'RegSaveKey')
-@unwrap_spec(typ=int, value=str)
+@unwrap_spec(typ=int, value="text")
def SetValue(space, w_hkey, w_subkey, typ, value):
"""SetValue(key, sub_key, type, value) - Associates a value with a
specified key.
@@ -388,7 +388,7 @@
else: # REG_BINARY and all other types
return space.newbytes(rffi.charpsize2str(buf, buflen))
-@unwrap_spec(value_name=str, typ=int)
+@unwrap_spec(value_name="text", typ=int)
def SetValueEx(space, w_hkey, value_name, w_reserved, typ, w_value):
"""SetValueEx(key, value_name, reserved, type, value) - Stores data in the
value field of an open registry key.
@@ -469,7 +469,7 @@
space.newint(intmask(retType[0])),
])
-@unwrap_spec(subkey=str)
+@unwrap_spec(subkey="text")
def CreateKey(space, w_hkey, subkey):
"""key = CreateKey(key, sub_key) - Creates or opens the specified key.
@@ -489,7 +489,7 @@
raiseWindowsError(space, ret, 'CreateKey')
return W_HKEY(space, rethkey[0])
-@unwrap_spec(subkey=str, res=int, sam=rffi.r_uint)
+@unwrap_spec(subkey="text", res=int, sam=rffi.r_uint)
def CreateKeyEx(space, w_hkey, subkey, res=0, sam=rwinreg.KEY_WRITE):
"""key = CreateKey(key, sub_key) - Creates or opens the specified key.
@@ -511,7 +511,7 @@
raiseWindowsError(space, ret, 'CreateKeyEx')
return W_HKEY(space, rethkey[0])
-@unwrap_spec(subkey=str)
+@unwrap_spec(subkey="text")
def DeleteKey(space, w_hkey, subkey):
"""DeleteKey(key, sub_key) - Deletes the specified key.
@@ -528,7 +528,7 @@
if ret != 0:
raiseWindowsError(space, ret, 'RegDeleteKey')
-@unwrap_spec(subkey=str)
+@unwrap_spec(subkey="text")
def DeleteValue(space, w_hkey, subkey):
"""DeleteValue(key, value) - Removes a named value from a registry key.
@@ -539,7 +539,7 @@
if ret != 0:
raiseWindowsError(space, ret, 'RegDeleteValue')
-@unwrap_spec(subkey=str, res=int, sam=rffi.r_uint)
+@unwrap_spec(subkey="text", res=int, sam=rffi.r_uint)
def OpenKey(space, w_hkey, subkey, res=0, sam=rwinreg.KEY_READ):
"""key = OpenKey(key, sub_key, res = 0, sam = KEY_READ) - Opens the
specified key.
@@ -727,7 +727,7 @@
raise oefmt(space.w_NotImplementedError,
"not implemented on this platform")
-@unwrap_spec(subkey=str)
+@unwrap_spec(subkey="text")
def DeleteKeyEx(space, w_key, subkey):
"""DeleteKeyEx(key, sub_key, sam, res) - Deletes the specified key.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit