Use the new Unicode API

* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
 * Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len)
 * Replace Py_UNICODE by wchar_t
 * posix_putenv() uses PyUnicode_FromFormat() to create the string, instead
   of PyUnicode_FromUnicode() + _snwprintf()
This commit is contained in:
Victor Stinner 2011-11-22 02:27:30 +01:00
parent b84d723509
commit 9d3b93ba30
10 changed files with 38 additions and 41 deletions

View file

@ -249,7 +249,7 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
"DLL load failed: ");
PyUnicode_AppendAndDel(&message,
PyUnicode_FromUnicode(
PyUnicode_FromWideChar(
theInfo,
theLength));
}