summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-10-07 01:02:42 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-10-07 01:02:42 (GMT)
commitbeb4135b8c81e1dbbb841ecd7355ab5a09a3edd2 (patch)
tree5477c04eae02035c7d3df9efb50f3a7fc6dd78a1 /Python
parentef12810f0c23a0c0e8b276e76d289f0f211ab5bb (diff)
downloadcpython-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 'Python')
-rw-r--r--Python/import.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/import.c b/Python/import.c
index 43c1494..ab1615c 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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: