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().
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 @@
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 @@
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 @@
return -1;
}
- path = PyUnicode_AsWideCharString((PyUnicodeObject*)pathobj, NULL);
+ path = PyUnicode_AsWideCharString(pathobj, NULL);
if (path == NULL)
return -1;
/* see issue1293 and issue3677: