summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #29044: Fix a use-after-free in string '%c' formatter.Xiang Zhang2016-12-221-3/+4
|
* Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.Serhiy Storchaka2016-12-051-2/+16
|
* Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).Serhiy Storchaka2016-11-161-1/+1
|
* Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.Serhiy Storchaka2016-11-161-0/+38
| | | | | | The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang.
* Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-0/+35
| | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
|\ | | | | | | when decode astral characters.
| * Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
| |\ | | | | | | | | | when decode astral characters.
| | * Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
| | | | | | | | | | | | when decode astral characters.
| | * Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.Serhiy Storchaka2015-12-021-0/+5
| | |
* | | Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug ↵Serhiy Storchaka2016-10-251-10/+2
|\ \ \ | |/ / | | | | | | build.
| * | Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug ↵Serhiy Storchaka2016-10-251-10/+2
| | | | | | | | | | | | build.
* | | remove extra PyErr_Format arguments (closes #28454)Benjamin Peterson2016-10-161-4/+4
| | | | | | | | | | | | Patch from Xiang Zhang.
* | | Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().Serhiy Storchaka2016-10-081-3/+7
| | | | | | | | | | | | Patch by Xiang Zhang.
* | | Fix PyUnicode_FromFormatV() error handlingVictor Stinner2016-09-211-1/+1
| | | | | | | | | | | | | | | Issue #28233: Fix a memory leak if the format string contains a non-ASCII character, destroy the unicode writer.
* | | promote some shifts to unsigned, so as not to invoke undefined behaviorBenjamin Peterson2016-09-071-3/+3
| | |
* | | Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded asSerhiy Storchaka2016-06-181-1/+7
| | | | | | | | | | | | an iterable of integers. Now only strings and byte-like objects are accepted.
* | | Issue #27171: Fix typos in documentation, comments, and test function namesMartin Panter2016-06-021-1/+1
| | |
* | | Correct “an” → “a” with “Unicode”, “user”, “UTF”, etcMartin Panter2016-04-151-1/+1
| | | | | | | | | | | | This affects documentation, code comments, and a debugging messages.
* | | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-4/+4
| | | | | | | | | | | | in places where Py_DECREF was used.
* | | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-4/+4
| | |
* | | Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-1/+1
| | | | | | | | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* | | Issue #26464: Fix unicode_fast_translate() againVictor Stinner2016-03-011-9/+12
| | | | | | | | | | | | Initialize i variable if the string is non-ASCII.
* | | Fix str.translate()Victor Stinner2016-03-011-3/+4
| | | | | | | | | | | | | | | | | | Issue #26464: Fix str.translate() when string is ASCII and first replacements removes character, but next replacement uses a non-ASCII character or a string longer than 1 character. Regression introduced in Python 3.5.0.
* | | Fix resize_compact()Victor Stinner2016-01-271-0/+2
| | | | | | | | | | | | | | | Issue #26217: resize_compact() must set wstr_length to 0 after freeing the wstr string. Otherwise, an assertion fails in _PyUnicode_CheckConsistency().
* | | Issue #20440: More use of Py_SETREF.Serhiy Storchaka2015-12-271-1/+1
| | | | | | | | | | | | | | | This patch is manually crafted and contains changes that couldn't be handled automatically.
* | | Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-8/+4
| | | | | | | | | | | | macro Py_SETREF.
* | | Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.Serhiy Storchaka2015-12-021-0/+5
|\ \ \ | |/ /
| * | Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.Serhiy Storchaka2015-12-021-0/+5
| | |
* | | make the PyUnicode_FSConverter cleanup set the decrefed argument to NULL ↵Benjamin Peterson2015-11-161-0/+1
| | | | | | | | | | | | (closes #25630)
* | | Issue #25523: Merge a-to-an corrections from 3.4.Serhiy Storchaka2015-11-021-2/+2
|\ \ \ | |/ /
| * | Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-021-2/+2
| | |
* | | Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:Serhiy Storchaka2015-10-021-9/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | 1. Non-ASCII bytes were accepted after shift sequence. 2. A low surrogate could be emitted in case of error in high surrogate. 3. In some circumstances the '\xfd' character was produced instead of the replacement character '\ufffd' (due to a bug in _PyUnicodeWriter).
| * | Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:Serhiy Storchaka2015-10-021-9/+12
| | | | | | | | | | | | | | | 1. Non-ASCII bytes were accepted after shift sequence. 2. A low surrogate could be emitted in case of error in high surrogate.
* | | Issue #21279: Merge with 3.4Zachary Ware2015-08-061-5/+6
|\ \ \ | |/ /
| * | Issue #21279: Flesh out str.translate docsZachary Ware2015-08-061-5/+6
| | | | | | | | | | | | Initial patch by Kinga Farkas, Martin Panter, and John Posner.
* | | Issue #24284: The startswith and endswith methods of the str class no longerSerhiy Storchaka2015-05-311-3/+3
| | | | | | | | | | | | | | | return True when finding the empty string and the indexes are completely out of range.
* | | Fix some compilation warnings when using gcc (-Wmaybe-uninitialized).Antoine Pitrou2015-05-191-3/+3
|\ \ \ | |/ /
| * | Fix some compilation warnings when using gcc (-Wmaybe-uninitialized).Antoine Pitrou2015-05-191-17/+17
| | |
* | | Issue #15027: The UTF-32 encoder is now 3x to 7x faster.Serhiy Storchaka2015-05-121-61/+41
| | |
* | | Issue #23908: os functions now reject paths with embedded null characterSerhiy Storchaka2015-04-201-15/+0
|\ \ \ | |/ / | | | | | | | | | | | | on Windows instead of silently truncate them. Removed no longer used _PyUnicode_HasNULChars().
| * | Issue #23803: Fixed str.partition() and str.rpartition() when a separatorSerhiy Storchaka2015-03-291-5/+5
| | | | | | | | | | | | is wider then partitioned string.
| * | merge 3.3 (#23362)Benjamin Peterson2015-03-021-1/+1
| |\ \ | | |/
| | * use PyMem_NEW to detect overflow (closes #23362)Benjamin Peterson2015-03-021-1/+1
| | |
| | * Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. AnalysisSerhiy Storchaka2015-01-271-0/+2
| | | | | | | | | | | | and fix by Guido Vranken.
* | | Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-39/+3
| | |
* | | _PyUnicodeWriter_WriteStr() now checks that the input string is consistentVictor Stinner2015-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | in debug mode to detect bugs earlier. _PyUnicodeWriter_Finish() doesn't check if the read only string is consistent, whereas it does check consistency for strings built by itself.
* | | Issue #23573: Increased performance of string search operations (str.find,Serhiy Storchaka2015-03-241-152/+192
| | | | | | | | | | | | | | | str.index, str.count, the in operator, str.split, str.partition) with arguments of different kinds (UCS1, UCS2, UCS4).
* | | Fix compiler warnings: comparison between signed and unsigned numbersVictor Stinner2015-03-201-1/+1
| | |
* | | Initialize variables to prevent GCC warningsVictor Stinner2015-03-181-15/+20
| | |
* | | Issue #23451: Update pyconfig.h for Windows to require Vista headers and ↵Steve Dower2015-03-021-18/+1
| | | | | | | | | | | | remove unnecessary version checks.