Change command line processing API to use wchar_t.

Fixes #2128.
This commit is contained in:
Martin v. Löwis 2008-04-05 20:41:37 +00:00
parent b9279bc88f
commit 790465fd90
21 changed files with 642 additions and 414 deletions

View file

@ -553,10 +553,16 @@ PyObject *PyUnicode_FromWideChar(register const wchar_t *w,
PyUnicodeObject *unicode;
if (w == NULL) {
if (size == 0)
return PyUnicode_FromStringAndSize(NULL, 0);
PyErr_BadInternalCall();
return NULL;
}
if (size == -1) {
size = wcslen(w);
}
unicode = _PyUnicode_New(size);
if (!unicode)
return NULL;