summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Issue #15609: Optimize str%args for integer argumentVictor Stinner2012-10-011-67/+101
|/ / | | | | | | | | | | | | | | | | | | - Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid a temporary buffer - Enable the fast path when width is smaller or equals to the length, and when the precision is bigger or equals to the length - Add unit tests! - formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII() to resize the output string
* | Issue #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-09-231-3/+4
|\ \ | |/ | | | | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
| * Issue #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-09-231-2/+26
| | | | | | | | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
* | Issue #15144: Fix possible integer overflow when handling pointers as ↵Antoine Pitrou2012-09-201-9/+6
| | | | | | | | | | | | integer values, by using Py_uintptr_t instead of size_t. Patch by Serhiy Storchaka.
* | Issue #15900: Fixed reference leak in PyUnicode_TranslateCharmap()Christian Heimes2012-09-111-6/+5
| |
* | Fixed memory leak in error branch of formatfloat(). CID 719687Christian Heimes2012-09-101-1/+3
| |
* | Fix C++-style comment (xlc compilation failure)Antoine Pitrou2012-09-021-1/+1
| |
* | merge 3.2 (#15801)Benjamin Peterson2012-08-281-2/+1
|\ \ | |/
| * use the stricter PyMapping_Check (closes #15801)Benjamin Peterson2012-08-281-2/+1
| |
* | Issue #15728: Fix leak in PyUnicode_AsWideCharString(). Found by Coverity.Stefan Krah2012-08-191-1/+3
| |
* | Merge str docstring fix from 3.2Nick Coghlan2012-08-161-4/+8
|\ \ | |/
| * Fix str docstringNick Coghlan2012-08-161-4/+8
| |
| * Issue #14579: Fix CVE-2012-2135: vulnerability in the utf-16 decoder after ↵Antoine Pitrou2012-07-201-31/+21
| | | | | | | | | | | | error handling. Patch by Serhiy Storchaka.
* | Use correct types for ASCII_CHAR_MASK integer constants.Mark Dickinson2012-07-071-2/+2
| |
* | Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.Antoine Pitrou2012-06-161-15/+48
| | | | | | | | Patch by Serhiy Storchaka.
* | _copy_characters(): move debug code at the top to avoid noisy #ifdefVictor Stinner2012-06-161-26/+23
| | | | | | | | | | And don't use assert() anymore if check_maxchar is set: return -1 on error instead.
* | Fix PyUnicode_GetSize(): Don't replace _PyUnicode_Ready() exceptionVictor Stinner2012-06-161-2/+3
| |
* | Fix a compiler warning in _copy_characters() and remove debug codeVictor Stinner2012-06-161-10/+1
| |
* | Oops, fix my previous change on _copy_characters()Victor Stinner2012-06-161-2/+2
| |
* | Fix unicode_adjust_maxchar(): catch PyUnicode_New() failureVictor Stinner2012-06-161-1/+2
| |
* | Fix "%f" format of str%args if the result is not an ASCII or latin1 stringVictor Stinner2012-06-161-17/+19
| |
* | Remove debug codeVictor Stinner2012-06-161-8/+0
| |
* | Optimize _PyUnicode_FastCopyCharacters() when maxchar(from) > maxchar(to)Victor Stinner2012-06-161-55/+75
| |
* | unicodeobject.c: Remove debug codeVictor Stinner2012-06-151-14/+0
| |
* | Issue #15026: utf-16 encoding is now significantly faster (up to 10x).Antoine Pitrou2012-06-151-47/+33
| | | | | | | | Patch by Serhiy Storchaka.
* | Rearrange code to beat an optimizer bug affecting Release x64 on windowsKristján Valur Jónsson2012-06-061-12/+10
| | | | | | | | with VS2010sp1
* | Issue #14993: Use standard "unsigned char" instead of a unsigned char bitfieldVictor Stinner2012-06-041-10/+10
| |
* | Issue #14909: A number of places were using PyMem_Realloc() apis andKristjan Valur Jonsson2012-05-311-2/+4
| | | | | | | | | | PyObject_GC_Resize() with incorrect error handling. In case of errors, the original object would be leaked. This checkin fixes those cases.
* | Issue #14744: Fix compilation on Windows (part 2)Victor Stinner2012-05-291-1/+1
| |
* | Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args ↵Victor Stinner2012-05-291-97/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and str.format(args) * Formatting string, int, float and complex use the _PyUnicodeWriter API. It avoids a temporary buffer in most cases. * Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just keep a reference to the string if the output is only composed of one string * Disable overallocation when formatting the last argument of str%args and str.format(args) * Overallocation allocates at least 100 characters: add min_length attribute to the _PyUnicodeWriter structure * Add new private functions: _PyUnicode_FastCopyCharacters(), _PyUnicode_FastFill() and _PyUnicode_FromASCII() The speed up is around 20% in average.
* | Issue #14624: UTF-16 decoding is now 3x to 4x faster on various inputs.Antoine Pitrou2012-05-151-198/+79
| | | | | | | | Patch by Serhiy Storchaka.
* | Silence VS 2010 signed/unsigned warnings.Martin v. Löwis2012-05-151-2/+5
| |
* | Fix refleaks introduced by 83da67651687.Antoine Pitrou2012-05-121-2/+8
| |
* | Fix logic error introduced by 83da67651687.Antoine Pitrou2012-05-121-2/+2
| |
* | simplify by shortcutting when the kind of the needle is larger than the haystackBenjamin Peterson2012-05-111-21/+11
| |
* | Issue #14738: Speed-up UTF-8 decoding on non-ASCII data. Patch by Serhiy ↵Antoine Pitrou2012-05-101-474/+165
| | | | | | | | Storchaka.
* | Rename unicode_write_t structure and its methods to "_PyUnicodeWriter"Victor Stinner2012-05-091-16/+16
| |
* | Issue #14744: Inline unicode_writer_write_char() and unicode_write_str()Victor Stinner2012-05-091-66/+53
| | | | | | | | | | Optimize also PyUnicode_Format(): call unicode_writer_prepare() only once per argument.
* | unicode_writer_finish() checks string consistencyVictor Stinner2012-05-091-0/+1
| |
* | Backout ab500b297900: the check for integer overflow is wrongVictor Stinner2012-05-071-4/+2
| | | | | | | | | | | | Issue #14716: Change integer overflow check in unicode_writer_prepare() to compute the limit at compile time instead of runtime. Patch writen by Serhiy Storchaka.
* | Issue #14716: Change integer overflow check in unicode_writer_prepare()Victor Stinner2012-05-071-2/+4
| | | | | | | | | | to compute the limit at compile time instead of runtime. Patch writen by Serhiy Storchaka.
* | Close #14716: str.format() now uses the new "unicode writer" API instead of theVictor Stinner2012-05-071-129/+129
| | | | | | | | PyAccu API. For example, it makes str.format() from 25% to 30% faster on Linux.
* | Issue #14700: Fix two broken and undefined-behaviour-inducing overflow ↵Mark Dickinson2012-05-071-2/+2
| | | | | | | | checks in old-style string formatting. Thanks Serhiy Storchaka for report and original patch.
* | unicode_writer: don't force inline when it is not necessaryVictor Stinner2012-05-031-3/+3
| | | | | | | | Keep inline for performance critical functions (functions used in loops)
* | if the kind of the string to count is larger than the string to search, ↵Benjamin Peterson2012-05-031-10/+3
| | | | | | | | shortcut to 0
* | unicode_writer: add finish() method and assertions to write_str() methodVictor Stinner2012-05-031-13/+33
| | | | | | | | | | * The write_str() method does nothing if the length is zero. * Replace "struct unicode_writer_t" with "unicode_writer_t"
* | Issue #14687: Remove redundant length attribute of unicode_write_tVictor Stinner2012-05-031-12/+8
| | | | | | | | The length can be read directly from the buffer
* | Issue #14687: Cleanup unicode_writer_prepare()Victor Stinner2012-05-031-23/+19
| | | | | | | | "Inline" PyUnicode_Resize(): call directly resize_compact()
* | Issue #14687: str%tuple now uses an optimistic "unicode writer" instead of anVictor Stinner2012-05-031-100/+166
| | | | | | | | | | accumulator. Directly write characters into the output (don't use a temporary list): resize and widen the string on demand.
* | Issue #14624, #14687: Optimize unicode_widen()Victor Stinner2012-05-031-7/+9
| | | | | | | | Don't convert uninitialized characters. Patch written by Serhiy Storchaka.