PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*

All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
This commit is contained in:
Victor Stinner 2010-10-07 01:02:42 +00:00
parent ef12810f0c
commit beb4135b8c
9 changed files with 14 additions and 14 deletions

View file

@ -1275,7 +1275,7 @@ PyUnicode_AsWideChar(PyUnicodeObject *unicode,
}
wchar_t*
PyUnicode_AsWideCharString(PyUnicodeObject *unicode,
PyUnicode_AsWideCharString(PyObject *unicode,
Py_ssize_t *size)
{
wchar_t* buffer;
@ -1286,7 +1286,7 @@ PyUnicode_AsWideCharString(PyUnicodeObject *unicode,
return NULL;
}
buflen = unicode_aswidechar(unicode, NULL, 0);
buflen = unicode_aswidechar((PyUnicodeObject *)unicode, NULL, 0);
if (PY_SSIZE_T_MAX / sizeof(wchar_t) < buflen) {
PyErr_NoMemory();
return NULL;
@ -1297,7 +1297,7 @@ PyUnicode_AsWideCharString(PyUnicodeObject *unicode,
PyErr_NoMemory();
return NULL;
}
buflen = unicode_aswidechar(unicode, buffer, buflen);
buflen = unicode_aswidechar((PyUnicodeObject *)unicode, buffer, buflen);
if (size != NULL)
*size = buflen;
return buffer;