diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-07 01:02:42 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-07 01:02:42 (GMT) |
commit | beb4135b8c81e1dbbb841ecd7355ab5a09a3edd2 (patch) | |
tree | 5477c04eae02035c7d3df9efb50f3a7fc6dd78a1 /Objects | |
parent | ef12810f0c23a0c0e8b276e76d289f0f211ab5bb (diff) | |
download | cpython-beb4135b8c81e1dbbb841ecd7355ab5a09a3edd2.zip cpython-beb4135b8c81e1dbbb841ecd7355ab5a09a3edd2.tar.gz cpython-beb4135b8c81e1dbbb841ecd7355ab5a09a3edd2.tar.bz2 |
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().
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3fd22a3..37a9070 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; |