summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix do_strip(): don't call PyUnicode_READ() in Py_UNICODE_ISSPACE() to not callVictor Stinner2013-04-091-3/+10
| | | | | | | | it twice
* | Fix _PyUnicode_XStrip()Victor Stinner2013-04-091-10/+18
| | | | | | | | | | | | Inline the BLOOM_MEMBER() to only call PyUnicode_READ() only once (per loop iteration). Store also the length of the seperator in a variable to avoid calls to PyUnicode_GET_LENGTH().
* | Optimize PyUnicode_DecodeCharmap()Victor Stinner2013-04-091-7/+9
| | | | | | | | | | Avoid expensive PyUnicode_READ() and PyUnicode_WRITE(), manipulate pointers instead.
* | Optimize make_bloom_mask(), used by str.strip(), str.lstrip() and str.rstrip()Victor Stinner2013-04-091-5/+27
| | | | | | | | | | Write specialized functions per Unicode kind to avoid the expensive PyUnicode_READ() macro.
* | Use PyUnicode_READ() instead of PyUnicode_READ_CHAR()Victor Stinner2013-04-091-6/+22
| | | | | | | | | | "PyUnicode_READ_CHAR() is less efficient than PyUnicode_READ() because it calls PyUnicode_KIND() and might call it twice." according to its documentation.
* | Add fast-path in PyUnicode_DecodeCharmap() for pure 8 bit encodings:Victor Stinner2013-04-091-1/+26
| | | | | | | | cp037, cp500 and iso8859_1 codecs
* | Issue #17615: Comparing two Unicode strings now uses wmemcmp() when possibleVictor Stinner2013-04-081-0/+22
| | | | | | | | | | wmemcmp() is twice faster than a dummy loop (342 usec vs 744 usec) on Fedora 18/x86_64, GCC 4.7.2.
* | Issue #17615: Expand expensive PyUnicode_READ() macro in unicode_compare():Victor Stinner2013-04-081-17/+77
| | | | | | | | write specialized functions for each combination of Unicode kinds.
* | fix unused variableVictor Stinner2013-04-031-1/+0
| |
* | Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() functionVictor Stinner2013-04-031-7/+10
| | | | | | | | when possible
* | Add _PyUnicodeWriter_WriteSubstring() functionVictor Stinner2013-04-021-9/+39
| | | | | | | | | | | | | | | | | | Write a function to enable more optimizations: * If the substring is the whole string and overallocation is disabled, just keep a reference to the string, don't copy characters * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when possible
* | mergeRaymond Hettinger2013-03-231-1/+4
|\ \ | |/
| * Issue 17447: Clarify that str.isidentifier doesn't check for reserved keywords.Raymond Hettinger2013-03-231-1/+4
| |
* | (Merge 3.3) _PyUnicode_Writer() now also reuses Unicode singletons:Victor Stinner2013-03-061-1/+1
|\ \ | |/ | | | | empty string and latin1 single character
| * _PyUnicode_Writer() now also reuses Unicode singletons:Victor Stinner2013-03-061-1/+1
| | | | | | | | empty string and latin1 single character
* | Backed out changeset b9f7b1bf36aaVictor Stinner2013-03-061-12/+7
| |
* | Issue #17223: Fix PyUnicode_FromUnicode() on Windows (16-bit wchar_t type)Victor Stinner2013-03-051-7/+12
| | | | | | | | to reject invalid UTF-16 surrogate.
* | (Merge 3.3) Issue #17223: Fix PyUnicode_FromUnicode() for string of 1 characterVictor Stinner2013-02-251-7/+7
|\ \ | |/ | | | | outside the range U+0000-U+10ffff.
| * Issue #17223: Fix PyUnicode_FromUnicode() for string of 1 character outsideVictor Stinner2013-02-251-7/+7
| | | | | | | | the range U+0000-U+10ffff.
* | (Merge 3.3) Issue #17137: When an Unicode string is resized, the internal wideVictor Stinner2013-02-071-0/+4
|\ \ | |/ | | | | character string (wstr) format is now cleared.
| * Issue #17137: When an Unicode string is resized, the internal wide characterVictor Stinner2013-02-071-0/+4
| | | | | | | | string (wstr) format is now cleared.
* | Issue #17043: The unicode-internal decoder no longer read past the end ofSerhiy Storchaka2013-02-071-26/+22
|\ \ | |/ | | | | input buffer.
| * Issue #17043: The unicode-internal decoder no longer read past the end ofSerhiy Storchaka2013-02-071-26/+22
| |\ | | | | | | | | | input buffer.
| | * Issue #17043: The unicode-internal decoder no longer read past the end ofSerhiy Storchaka2013-02-071-27/+24
| | | | | | | | | | | | input buffer.
* | | Issue #16971: Fix a refleak in the charmap decoder.Serhiy Storchaka2013-01-291-4/+12
|\ \ \ | |/ /
| * | Issue #16971: Fix a refleak in the charmap decoder.Serhiy Storchaka2013-01-291-4/+13
| | |
* | | Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-291-51/+29
|\ \ \ | |/ /
| * | Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-291-52/+30
| |\ \ | | |/
| | * Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-291-51/+28
| | |
* | | Issue #10156: In the interpreter's initialization phase, unicode globalsSerhiy Storchaka2013-01-261-110/+83
|\ \ \ | |/ / | | | | | | are now initialized dynamically as needed.
| * | Issue #10156: In the interpreter's initialization phase, unicode globalsSerhiy Storchaka2013-01-261-90/+73
| |\ \ | | |/ | | | | | | are now initialized dynamically as needed.
| | * Issue #10156: In the interpreter's initialization phase, unicode globalsSerhiy Storchaka2013-01-261-52/+45
| | | | | | | | | | | | are now initialized dynamically as needed.
* | | Issue #16980: Fix processing of escaped non-ascii bytes in theSerhiy Storchaka2013-01-251-1/+1
|\ \ \ | |/ / | | | | | | unicode-escape-decode decoder.
| * | Issue #16980: Fix processing of escaped non-ascii bytes in theSerhiy Storchaka2013-01-251-1/+1
| | | | | | | | | | | | unicode-escape-decode decoder.
* | | Issue #16335: Fix integer overflow in unicode-escape decoder.Serhiy Storchaka2013-01-211-1/+2
|\ \ \ | |/ /
| * | Issue #16335: Fix integer overflow in unicode-escape decoder.Serhiy Storchaka2013-01-211-1/+2
| |\ \ | | |/
| | * Issue #16335: Fix integer overflow in unicode-escape decoder.Serhiy Storchaka2013-01-211-1/+2
| | |
| * | Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-191-2/+2
| |\ \ | | |/ | | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
| | * Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-191-2/+2
| | | | | | | | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
* | | Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka2013-01-151-19/+33
|\ \ \ | |/ / | | | | | | in any mapping, not only in an unicode string.
| * | Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka2013-01-151-19/+22
| |\ \ | | |/ | | | | | | in any mapping, not only in an unicode string.
| | * Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka2013-01-151-21/+25
| | | | | | | | | | | | in any mapping, not only in an unicode string.
* | | Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-141-2/+2
| | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks.
* | | merge 3.3 (#16906)Benjamin Peterson2013-01-091-6/+9
|\ \ \ | |/ /
| * | correct static string clearing loop (closes #16906)Benjamin Peterson2013-01-091-6/+9
| | |
* | | Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-1/+4
|\ \ \ | |/ / | | | | | | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
| * | Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-1/+4
| |\ \ | | |/ | | | | | | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
| | * Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-1/+4
| | | | | | | | | | | | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
| | * Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.Serhiy Storchaka2013-01-081-1/+1
| | |
* | | Issue #16856: Fix a segmentation fault from calling repr() on a dict withSerhiy Storchaka2013-01-041-1/+1
|\ \ \ | |/ / | | | | | | a key whose repr raise an exception.