[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread Ned Deily
Ned Deily added the comment: That fixes it. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread STINNER Victor
STINNER Victor added the comment: > Looks like length is incorrect. Oh ok, _testcapimodule.c is "sssize_t" safe in Python 3, not in Python 2. Can you please try with the last tip? -- ___ Python tracker _

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3ecddf168f1f by Victor Stinner in branch '2.7': Issue #13093: Fix _testcapi.unicode_encodedecimal() http://hg.python.org/cpython/rev/3ecddf168f1f -- ___ Python tracker

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread Ned Deily
Ned Deily added the comment: I am able to reproduce the problem on 2.7 OS X 10.7 64-bit. unicode._encodedecimal is gobbling up memory. Looks like length is incorrect. Breakpoint 1, unicode_encodedecimal (self=0x0, args=0x1007ce0d0) at /Users/nad/Projects/PyDev/active/temp/u27-clang/Modules/_

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread STINNER Victor
STINNER Victor added the comment: > A 2.7 OS X buildbot segfaults in test_unicode since 0cd197f13400 > http://www.python.org/dev/buildbot/all/builders/AMD64 Snow Leopard 2 > 2.7/builds/409/steps/test/logs/stdio Hum, I'm unable to reproduce the crash on Linux or Mac OS X Tiger. -- ___

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread Charles-François Natali
Charles-François Natali added the comment: A 2.7 OS X buildbot segfaults in test_unicode since 0cd197f13400 : http://www.python.org/dev/buildbot/all/builders/AMD64 Snow Leopard 2 2.7/builds/409/steps/test/logs/stdio """ test_unicode make: *** [buildbottest] Segmentation fault program finished

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-25 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg148348 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset a20fae95618c by Victor Stinner in branch 'default': Close #13093: PyUnicode_EncodeDecimal() doesn't support error handlers http://hg.python.org/cpython/rev/a20fae95618c -- stage: patch review -> committed/rejected _

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52fecdc1c5d8 by Charles-François Natali in branch 'default': Issue #13093: Perform a real merge. http://hg.python.org/cpython/rev/52fecdc1c5d8 -- ___ Python tracker _

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-21 Thread STINNER Victor
STINNER Victor added the comment: I fixed the issue in Python 2.7, 3.2 and 3.3. See also the changeset 849e9277906a (Python 3.3). -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0cd197f13400 by Victor Stinner in branch '2.7': Issue #13093: Fix error handling on PyUnicode_EncodeDecimal() http://hg.python.org/cpython/rev/0cd197f13400 -- ___ Python tracker

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset f29d7d597fae by Victor Stinner in branch '3.2': Issue #13093: Fix error handling on PyUnicode_EncodeDecimal() http://hg.python.org/cpython/rev/f29d7d597fae New changeset bc53c11804ab by Victor Stinner in branch 'default': (Merge 3.2) Issue #13093:

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: AFAICT, this code was introduced in 0337dad8403e, implementing PEP 293 (see #432401). The intention clearly was what Stefan figured out: compute the list of unencodable characters, to pass the longest run of unencodable characters to the error handler. Fixi

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-09 Thread Stefan Krah
Stefan Krah added the comment: Looking at it again, the intention was probably to increment collend so that it points to the first non-garbage character (or '\0'). If that's the case, the loop should be something like this: while (collend < end) { if ((0 < *collend && *collend < 256) ||

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-09 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-09 Thread STINNER Victor
STINNER Victor added the comment: PyUnicode_EncodeDecimal() was used in Python 2 by int, long and complex constructors. In Python 3, the function is no more used: it has been replaced by _PyUnicode_TransformDecimalAndSpaceToASCII(). -- ___ Python t

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-09 Thread STINNER Victor
STINNER Victor added the comment: The code is also present in Python 2.7 and 3.2. -- nosy: +haypo versions: +Python 2.7, Python 3.2 ___ Python tracker ___ __

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +facundobatista, mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-10-02 Thread Stefan Krah
New submission from Stefan Krah : I can't see what this code is supposed to accomplish (see patch): while (collend < end) { if ((0 < *collend && *collend < 256) || !Py_UNICODE_ISSPACE(*collend) || Py_UNICODE_TODECIMAL(*collend)) break; } Since 'collend'