mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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:
parent
ef12810f0c
commit
beb4135b8c
9 changed files with 14 additions and 14 deletions
|
@ -1970,7 +1970,7 @@ _Py_fopen(PyObject *unicode, const char *mode)
|
|||
if (usize == 0)
|
||||
return NULL;
|
||||
|
||||
path = PyUnicode_AsWideCharString((PyUnicodeObject*)unicode, NULL);
|
||||
path = PyUnicode_AsWideCharString(unicode, NULL);
|
||||
if (path == NULL)
|
||||
return NULL;
|
||||
f = _wfopen(path, wmode);
|
||||
|
@ -2001,7 +2001,7 @@ _Py_stat(PyObject *unicode, struct stat *statbuf)
|
|||
int err;
|
||||
struct _stat wstatbuf;
|
||||
|
||||
path = PyUnicode_AsWideCharString((PyUnicodeObject*)unicode, NULL);
|
||||
path = PyUnicode_AsWideCharString(unicode, NULL);
|
||||
if (path == NULL)
|
||||
return -1;
|
||||
err = _wstat(path, &wstatbuf);
|
||||
|
@ -3736,7 +3736,7 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds)
|
|||
return -1;
|
||||
}
|
||||
|
||||
path = PyUnicode_AsWideCharString((PyUnicodeObject*)pathobj, NULL);
|
||||
path = PyUnicode_AsWideCharString(pathobj, NULL);
|
||||
if (path == NULL)
|
||||
return -1;
|
||||
/* see issue1293 and issue3677:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue