Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix the internals of our hash functions to used unsigned values during hash | Gregory P. Smith | 2012-12-10 | 1 | -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 hash | Gregory P. Smith | 2012-12-10 | 1 | -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 always | Victor Stinner | 2012-12-03 | 1 | -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 always | Victor Stinner | 2012-12-03 | 1 | -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 Pitrou | 2012-11-17 | 1 | -0/+2 |
| | | | | | | | | Patch by Serhiy Storchaka. | ||||
* | | #8271: the utf-8 decoder now outputs the correct number of U+FFFD ↵ | Ezio Melotti | 2012-11-04 | 1 | -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 Peterson | 2012-10-30 | 1 | -0/+6 |
|\ \ | |/ | |||||
| * | initialize more global type objects (closes #16369) | Benjamin Peterson | 2012-10-30 | 1 | -0/+6 |
| | | |||||
| * | Issue #14700: Fix buggy overflow checks for large precision and width in ↵ | Mark Dickinson | 2012-10-28 | 1 | -2/+2 |
| | | | | | | | | new-style and old-style formatting. | ||||
* | | Issue #14783: Merge changes from 3.2. | Chris Jerdonek | 2012-10-07 | 1 | -1/+2 |
|\ \ | |/ | |||||
| * | Issue #14783: Improve int() docstring and also str(), range(), and slice(). | Chris Jerdonek | 2012-10-07 | 1 | -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 Dickinson | 2012-10-06 | 1 | -14/+9 |
| | | | | | | | | Thanks Serhiy Storchaka. | ||||
* | | #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka. | Ezio Melotti | 2012-10-05 | 1 | -10/+4 |
| | | |||||
* | | Fix PyUnicode_Format(): return NULL if PyUnicode_READY(uformat) failed | Victor Stinner | 2012-10-05 | 1 | -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 Pitrou | 2012-09-23 | 1 | -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 Pitrou | 2012-09-23 | 1 | -2/+26 |
| | | | | | | | | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka. | ||||
* | | Issue #15144: Fix possible integer overflow when handling pointers as ↵ | Antoine Pitrou | 2012-09-20 | 1 | -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 Heimes | 2012-09-11 | 1 | -6/+5 |
| | | |||||
* | | Fixed memory leak in error branch of formatfloat(). CID 719687 | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
| | | |||||
* | | Fix C++-style comment (xlc compilation failure) | Antoine Pitrou | 2012-09-02 | 1 | -1/+1 |
| | | |||||
* | | merge 3.2 (#15801) | Benjamin Peterson | 2012-08-28 | 1 | -2/+1 |
|\ \ | |/ | |||||
| * | use the stricter PyMapping_Check (closes #15801) | Benjamin Peterson | 2012-08-28 | 1 | -2/+1 |
| | | |||||
* | | Issue #15728: Fix leak in PyUnicode_AsWideCharString(). Found by Coverity. | Stefan Krah | 2012-08-19 | 1 | -1/+3 |
| | | |||||
* | | Merge str docstring fix from 3.2 | Nick Coghlan | 2012-08-16 | 1 | -4/+8 |
|\ \ | |/ | |||||
| * | Fix str docstring | Nick Coghlan | 2012-08-16 | 1 | -4/+8 |
| | | |||||
| * | Issue #14579: Fix CVE-2012-2135: vulnerability in the utf-16 decoder after ↵ | Antoine Pitrou | 2012-07-21 | 1 | -31/+21 |
| | | | | | | | | | | | | error handling. Patch by Serhiy Storchaka. | ||||
* | | Use correct types for ASCII_CHAR_MASK integer constants. | Mark Dickinson | 2012-07-07 | 1 | -2/+2 |
| | | |||||
* | | Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. | Antoine Pitrou | 2012-06-16 | 1 | -15/+48 |
| | | | | | | | | Patch by Serhiy Storchaka. | ||||
* | | _copy_characters(): move debug code at the top to avoid noisy #ifdef | Victor Stinner | 2012-06-16 | 1 | -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() exception | Victor Stinner | 2012-06-16 | 1 | -2/+3 |
| | | |||||
* | | Fix a compiler warning in _copy_characters() and remove debug code | Victor Stinner | 2012-06-16 | 1 | -10/+1 |
| | | |||||
* | | Oops, fix my previous change on _copy_characters() | Victor Stinner | 2012-06-16 | 1 | -2/+2 |
| | | |||||
* | | Fix unicode_adjust_maxchar(): catch PyUnicode_New() failure | Victor Stinner | 2012-06-16 | 1 | -1/+2 |
| | | |||||
* | | Fix "%f" format of str%args if the result is not an ASCII or latin1 string | Victor Stinner | 2012-06-16 | 1 | -17/+19 |
| | | |||||
* | | Remove debug code | Victor Stinner | 2012-06-16 | 1 | -8/+0 |
| | | |||||
* | | Optimize _PyUnicode_FastCopyCharacters() when maxchar(from) > maxchar(to) | Victor Stinner | 2012-06-16 | 1 | -55/+75 |
| | | |||||
* | | unicodeobject.c: Remove debug code | Victor Stinner | 2012-06-16 | 1 | -14/+0 |
| | | |||||
* | | Issue #15026: utf-16 encoding is now significantly faster (up to 10x). | Antoine Pitrou | 2012-06-15 | 1 | -47/+33 |
| | | | | | | | | Patch by Serhiy Storchaka. | ||||
* | | Rearrange code to beat an optimizer bug affecting Release x64 on windows | Kristján Valur Jónsson | 2012-06-06 | 1 | -12/+10 |
| | | | | | | | | with VS2010sp1 | ||||
* | | Issue #14993: Use standard "unsigned char" instead of a unsigned char bitfield | Victor Stinner | 2012-06-04 | 1 | -10/+10 |
| | | |||||
* | | Issue #14909: A number of places were using PyMem_Realloc() apis and | Kristjan Valur Jonsson | 2012-05-31 | 1 | -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 Stinner | 2012-05-29 | 1 | -1/+1 |
| | | |||||
* | | Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args ↵ | Victor Stinner | 2012-05-29 | 1 | -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 Pitrou | 2012-05-15 | 1 | -198/+79 |
| | | | | | | | | Patch by Serhiy Storchaka. | ||||
* | | Silence VS 2010 signed/unsigned warnings. | Martin v. Löwis | 2012-05-15 | 1 | -2/+5 |
| | | |||||
* | | Fix refleaks introduced by 83da67651687. | Antoine Pitrou | 2012-05-12 | 1 | -2/+8 |
| | | |||||
* | | Fix logic error introduced by 83da67651687. | Antoine Pitrou | 2012-05-12 | 1 | -2/+2 |
| | | |||||
* | | simplify by shortcutting when the kind of the needle is larger than the haystack | Benjamin Peterson | 2012-05-11 | 1 | -21/+11 |
| | | |||||
* | | Issue #14738: Speed-up UTF-8 decoding on non-ASCII data. Patch by Serhiy ↵ | Antoine Pitrou | 2012-05-10 | 1 | -474/+165 |
| | | | | | | | | Storchaka. | ||||
* | | Rename unicode_write_t structure and its methods to "_PyUnicodeWriter" | Victor Stinner | 2012-05-09 | 1 | -16/+16 |
| | |