summaryrefslogtreecommitdiffstats
path: root/PC/winreg.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-09-28 05:41:54 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-09-28 05:41:54 (GMT)
commitd63a3b8beb4a0841cb59fb3515347ccaab34b733 (patch)
tree3b4e3cc63151c5a5a910c3550a190aefaea96ad4 /PC/winreg.c
parent48d49497c50e79d14e9df9527d766ca3a0a38be5 (diff)
downloadcpython-d63a3b8beb4a0841cb59fb3515347ccaab34b733.zip
cpython-d63a3b8beb4a0841cb59fb3515347ccaab34b733.tar.gz
cpython-d63a3b8beb4a0841cb59fb3515347ccaab34b733.tar.bz2
Implement PEP 393.
Diffstat (limited to 'PC/winreg.c')
-rw-r--r--PC/winreg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 1bc47b9..38e22f8 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -882,7 +882,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
retDataSize -= 2;
if (retDataSize <= 0)
data = L"";
- obData = PyUnicode_FromUnicode(data, retDataSize/2);
+ obData = PyUnicode_FromWideChar(data, retDataSize/2);
break;
}
case REG_MULTI_SZ:
@@ -913,7 +913,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
}
PyList_SetItem(obData,
index,
- PyUnicode_FromUnicode(str[index], len));
+ PyUnicode_FromWideChar(str[index], len));
}
free(str);
@@ -1123,7 +1123,7 @@ PyEnumKey(PyObject *self, PyObject *args)
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegEnumKeyEx");
- retStr = PyUnicode_FromUnicode(tmpbuf, len);
+ retStr = PyUnicode_FromWideChar(tmpbuf, len);
return retStr; /* can be NULL */
}
@@ -1394,7 +1394,7 @@ PyQueryValue(PyObject *self, PyObject *args)
"RegQueryValue");
}
- retStr = PyUnicode_FromUnicode(retBuf, wcslen(retBuf));
+ retStr = PyUnicode_FromWideChar(retBuf, wcslen(retBuf));
PyMem_Free(retBuf);
return retStr;
}