[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-29 Thread STINNER Victor
STINNER Victor added the comment: I fixed in this issue in multiple commits: - r85093: create PyUnicode_AsWideCharString() - r85094: use it in import.c - r85095: use it for _locale.strcoll() - r85096: use it for time.strftime() - r85097: use it in _ctypes module > So, you agree with the AP

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-29 Thread STINNER Victor
STINNER Victor added the comment: > But shouldn't PyUnicode_AsWideCharString() merge surrogate pairs when it > can? The implementation doesn't do this. I don't want to do two different things at the same time. My plan is: - create PyUnicode_AsWideCharString() - use PyUnicode_AsWideCharString(

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: +1 from me as well. But shouldn't PyUnicode_AsWideCharString() merge surrogate pairs when it can? The implementation doesn't do this. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > PyUnicode_AsWideChar() doesn't merge surrogate pairs on a system with 32 bits > wchar_t and Python compiled in narrow mode (sizeof(wchar_t) == 4 and > sizeof(Py_UNICODE) == 2) => see issu

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19054/pyunicode_aswidecharstring.patch ___ Python tracker ___ ___ Python-b

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - fix PyUnicode_AsWideCharString() :-) - replace PyUnicode_AsWideChar() by PyUnicode_AsWideCharString() in most functions using PyUnicode_AsWideChar() - indicate that PyUnicode_AsWideCharString() raises a MemoryError on error Keep

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +ezio.melotti, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-28 Thread STINNER Victor
New submission from STINNER Victor : PyUnicode_AsWideChar() doesn't merge surrogate pairs on a system with 32 bits wchar_t and Python compiled in narrow mode (sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) == 2) => see issue #8670. It is not easy to fix this problem because the callers of PyUnic