[issue9425] Rewrite import machinery to work with unicode paths
STINNER Victor
report at bugs.python.org
Mon Aug 9 01:29:48 CEST 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Py_UNICODE_strrchr.patch: Create Py_UNICODE_strrchr() function. It will be used for zipimport to work on unicode paths instead of bytes paths.
Antoine noticed that the input string is const whereas the output string is not const, which is unusual. I copy/pasted Py_UNICODE_strchr() prototype.
I suppose that const input and non const input is required to be able to use the function on const strings. The GNU libc uses the same strchr() prototype in its C version of string.h. In the C++ version of the header, it defines the strchr() twice: once with const input and output, once with non const input and ouput. The right solution is the C++ way, but C doesn't support polymophism.
----------
Added file: http://bugs.python.org/file18446/Py_UNICODE_strrchr.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9425>
_______________________________________
More information about the Python-bugs-list
mailing list