[issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API

2012-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset e16ec3b468d1 by Victor Stinner in branch 'default': Issue #16147: PyUnicode_FromFormatV() doesn't need anymore to allocate a buffer http://hg.python.org/cpython/rev/e16ec3b468d1 -- ___ Python tracker

[issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API

2012-10-06 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API

2012-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset b4bee17625e1 by Victor Stinner in branch 'default': Issue #16147: Rewrite PyUnicode_FromFormatV() to use _PyUnicodeWriter API http://hg.python.org/cpython/rev/b4bee17625e1 New changeset d1369daeb9ec by Victor Stinner in branch 'default': Issue #1614

[issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API

2012-10-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API

2012-10-05 Thread STINNER Victor
STINNER Victor added the comment: "Split PyUnicode_FromFormatV() into smaller functions: add unicode_fromformat_arg(). It requires to copy vargs using Py_VA_COPY: without Py_VA_COPY, the function does crash. I don't understand why." Ok, here is the answer. http://stackoverflow.com/questions/80

[issue16147] Rewrite PyUnicode_FromFormatV() to use the _PyUnicodeWriter API

2012-10-05 Thread STINNER Victor
New submission from STINNER Victor: Attached patch rewrites PyUnicode_FromFormatV(): * simplify the code: replace 4 steps with one unique step. PyUnicode_Format() has the same design. It avoids to store intermediate results which require to allocate an array of pointers in the heap. * use the