diff Modules/socketmodule.c @ 73683:d48b4a1c511a

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()
author Victor Stinner <victor.stinner@haypocalc.com>
date Tue, 22 Nov 2011 02:27:30 +0100
parents 488a2e41e89d
children 1f23bb74f4bc
line wrap: on
line diff
--- a/Modules/socketmodule.c	Tue Nov 22 01:50:07 2011 +0100
+++ b/Modules/socketmodule.c	Tue Nov 22 02:27:30 2011 +0100
@@ -3900,7 +3900,7 @@
     PyObject *result;
 
     if (GetComputerNameExW(ComputerNamePhysicalDnsHostname, buf, &size))
-        return PyUnicode_FromUnicode(buf, size);
+        return PyUnicode_FromWideChar(buf, size);
 
     if (GetLastError() != ERROR_MORE_DATA)
         return PyErr_SetFromWindowsErr(0);