diff Python/import.c @ 65157:e3ae5b00ba15

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().
author Victor Stinner <victor.stinner@haypocalc.com>
date Thu, 07 Oct 2010 01:02:42 +0000
parents ea4723aac478
children 39014f0abc32
line wrap: on
line diff
--- a/Python/import.c	Thu Oct 07 01:00:52 2010 +0000
+++ b/Python/import.c	Thu Oct 07 01:02:42 2010 +0000
@@ -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: