summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue 17447: Clarify that str.isidentifier doesn't check for reserved keywords.Raymond Hettinger2013-03-231-1/+4
|
* _PyUnicode_Writer() now also reuses Unicode singletons:Victor Stinner2013-03-061-1/+1
| | | | empty string and latin1 single character
* Issue #17223: Fix PyUnicode_FromUnicode() for string of 1 character outsideVictor Stinner2013-02-251-7/+7
| | | | the range U+0000-U+10ffff.
* 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-27/+24
| | | | | | | | input buffer.
* | 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-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-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 #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/+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.
* | 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.
| * 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.
* | (Merge 3.2) Issue #16455: On FreeBSD and Solaris, if the locale is C, theVictor Stinner2013-01-031-4/+4
|\ \ | |/ | | | | | | | | | | ASCII/surrogateescape codec is now used, instead of the locale encoding, to decode the command line arguments. This change fixes inconsistencies with os.fsencode() and os.fsdecode() because these operating systems announces an ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
| * Issue #16455: On FreeBSD and Solaris, if the locale is C, theVictor Stinner2013-01-031-4/+4
| | | | | | | | | | | | | | ASCII/surrogateescape codec is now used, instead of the locale encoding, to decode the command line arguments. This change fixes inconsistencies with os.fsencode() and os.fsdecode() because these operating systems announces an ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
* | Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-111-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | computation as the overflow behavior of signed integers is undefined. NOTE: This change is smaller compared to 3.2 as much of this cleanup had already been done. I added the comment that my change in 3.2 added so that the code would match up. Otherwise this just adds or synchronizes appropriate UL designations on some constants to be pedantic. In practice we require compiling everything with -fwrapv which forces overflow to be defined as twos compliment but this keeps the code cleaner for checkers or in the case where someone has compiled it without -fwrapv or their compiler's equivalent. Found by Clang trunk's Undefined Behavior Sanitizer (UBSan). Cleanup only - no functionality or hash values change.
| * Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | computation as the overflow behavior of signed integers is undefined. In practice we require compiling everything with -fwrapv which forces overflow to be defined as twos compliment but this keeps the code cleaner for checkers or in the case where someone has compiled it without -fwrapv or their compiler's equivalent. Found by Clang trunk's Undefined Behavior Sanitizer (UBSan). Cleanup only - no functionality or hash values change.
* | (Merge 3.2) Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner2012-12-031-4/+5
|\ \ | |/ | | | | | | | | | | encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no locale environment variable is set), to avoid inconsistencies with os.fsencode() and os.fsdecode() functions which are already using UTF-8/surrogateescape.
| * Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner2012-12-031-4/+5
| | | | | | | | | | | | | | encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no locale environment variable is set), to avoid inconsistencies with os.fsencode() and os.fsdecode() functions which are already using UTF-8/surrogateescape.
* | Issue #16215: Fix potential double memory free in str.replace().Antoine Pitrou2012-11-171-0/+2
| | | | | | | | Patch by Serhiy Storchaka.
* | #8271: the utf-8 decoder now outputs the correct number of U+FFFD ↵Ezio Melotti2012-11-041-6/+4
| | | | | | | | characters when used with the "replace" error handler on invalid utf-8 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti.
* | merge 3.2 (#16369)Benjamin Peterson2012-10-311-0/+6
|\ \ | |/
| * initialize more global type objects (closes #16369)Benjamin Peterson2012-10-311-0/+6
| |
| * Issue #14700: Fix buggy overflow checks for large precision and width in ↵Mark Dickinson2012-10-281-2/+2
| | | | | | | | new-style and old-style formatting.
* | Issue #14783: Merge changes from 3.2.Chris Jerdonek2012-10-071-1/+2
|\ \ | |/
| * Issue #14783: Improve int() docstring and also str(), range(), and slice().Chris Jerdonek2012-10-071-1/+2
| | | | | | | | | | | | This commit rewrites the docstring for int() to incorporate the documentation changes made in issue #16036. It also switches the docstrings for int(), str(), range(), and slice() to use multi-line signatures.
* | Issue #16096: Fix several occurrences of potential signed integer overflow. ↵Mark Dickinson2012-10-061-14/+9
| | | | | | | | Thanks Serhiy Storchaka.
* | #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka.Ezio Melotti2012-10-051-10/+4
| |
* | Fix PyUnicode_Format(): return NULL if PyUnicode_READY(uformat) failedVictor Stinner2012-10-041-1/+3
| | | | | | | | | | This error cannot occur in practice: PyUnicode_FromObject() always return a "ready" 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
| |