Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | #8271: merge with 3.3. | Ezio Melotti | 2012-11-04 | 1 | -6/+4 |
|\ | |||||
| * | #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.3 (#16369) | Benjamin Peterson | 2012-10-30 | 1 | -0/+6 |
|\ \ | |/ | |||||
| * | 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. | ||||
* | | | Close #14625: Rewrite the UTF-32 decoder. It is now 3x to 4x faster | Victor Stinner | 2012-10-30 | 1 | -73/+69 |
| | | | | | | | | | | | | Patch written by Serhiy Storchaka. | ||||
* | | | Issue #16330: Use surrogate-related macros | Victor Stinner | 2012-10-30 | 1 | -4/+3 |
| | | | | | | | | | | | | Patch written by Serhiy Storchaka. | ||||
* | | | Replace usage of the deprecated Py_UNICODE_COPY() with Py_MEMCPY() in ↵ | Victor Stinner | 2012-10-23 | 1 | -2/+2 |
| | | | | | | | | | | | | resize_copy() | ||||
* | | | Optimize _PyUnicode_HasNULChars(): use findchar() instead of ↵ | Victor Stinner | 2012-10-23 | 1 | -7/+9 |
| | | | | | | | | | | | | PyUnicode_Contains() | ||||
* | | | Inline raise_translate_exception(): it is only used once | Victor Stinner | 2012-10-23 | 1 | -15/+4 |
| | | | |||||
* | | | Optimize PyUnicode_RichCompare() for Py_EQ and Py_NE: always use memcmp() | Victor Stinner | 2012-10-23 | 1 | -26/+44 |
| | | | |||||
* | | | Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified | Christian Heimes | 2012-10-17 | 1 | -13/+5 |
| | | | | | | | | | | | | endianess detection and handling. | ||||
* | | | Issue #14783: Merge changes from 3.3. | Chris Jerdonek | 2012-10-07 | 1 | -1/+2 |
|\ \ \ | |/ / | |||||
| * | | 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. | ||||
* | | | Cleanup PyUnicode_FromFormatV() for zero padding | Victor Stinner | 2012-10-06 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | Skip the "0" instead of parsing it twice: detect zero padding and then parsed as a digit of the width. | ||||
* | | | Issue #16147: PyUnicode_FromFormatV() doesn't need anymore to allocate a buffer | Victor Stinner | 2012-10-06 | 1 | -46/+14 |
| | | | | | | | | | | | | on the heap to format numbers. | ||||
* | | | Issue #16147: PyUnicode_FromFormatV() now raises an error if the argument of | Victor Stinner | 2012-10-06 | 1 | -0/+5 |
| | | | | | | | | | | | | '%c' is not in the range(0x110000). | ||||
* | | | Issue #16147: PyUnicode_FromFormatV() now detects integer overflow when parsing | Victor Stinner | 2012-10-06 | 1 | -1/+11 |
| | | | | | | | | | | | | width and precision | ||||
* | | | Issue #16147: Rewrite PyUnicode_FromFormatV() to use _PyUnicodeWriter API | Victor Stinner | 2012-10-06 | 1 | -483/+331 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Simplify the code: replace 4 steps with one unique step using the _PyUnicodeWriter API. PyUnicode_Format() has the same design. It avoids to store intermediate results which require to allocate an array of pointers on the heap. * Use the _PyUnicodeWriter API for speed (and its convinient API): overallocate the buffer to reduce the number of "realloc()" * Implement "width" and "precision" in Python, don't rely on sprintf(). It avoids to need of a temporary buffer allocated on the heap: only use a small buffer allocated in the stack. * Add _PyUnicodeWriter_WriteCstr() function * Split PyUnicode_FromFormatV() into two functions: add unicode_fromformat_arg(). * Inline parse_format_flags(): the format of an argument is now only parsed once, it's no more needed to have a subfunction. * Optimize PyUnicode_FromFormatV() for characters between two "%" arguments: search the next "%" and copy the substring in one chunk, instead of copying character per character. | ||||
* | | | Issue #16096: Merge fixes from 3.3. | Mark Dickinson | 2012-10-06 | 1 | -14/+9 |
|\ \ \ | |/ / | |||||
| * | | Issue #16096: Fix several occurrences of potential signed integer overflow. ↵ | Mark Dickinson | 2012-10-06 | 1 | -14/+9 |
| | | | | | | | | | | | | Thanks Serhiy Storchaka. | ||||
* | | | In debug mode, unicode_write_cstr() now checks that non-ASCII characters are | Victor Stinner | 2012-10-06 | 1 | -0/+8 |
| | | | | | | | | | | | | not written into an ASCII string | ||||
* | | | #16127: merge with 3.3. | Ezio Melotti | 2012-10-05 | 1 | -10/+4 |
|\ \ \ | |/ / | |||||
| * | | #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. | ||||
* | | | Optimize unicode_compare(): use memcmp() when comparing two UCS1 strings | Victor Stinner | 2012-10-04 | 1 | -8/+25 |
| | | | |||||
* | | | Enable also ptr==ptr optimization in PyUnicode_Compare() | Victor Stinner | 2012-10-04 | 1 | -4/+5 |
| | | | | | | | | | | | | It was already implemented in PyUnicode_RichCompare() | ||||
* | | | unicode_result_wchar(): move the assert() to the "#ifdef Py_DEBUG" block | Victor Stinner | 2012-10-04 | 1 | -3/+3 |
| | | | |||||
* | | | Split the huge PyUnicode_Format() function (+540 lines) into subfunctions | Victor Stinner | 2012-10-04 | 1 | -472/+605 |
| | | | |||||
* | | | PyUnicode_Format(): disable overallocation when we are writing the last part | Victor Stinner | 2012-10-03 | 1 | -1/+3 |
| | | | | | | | | | | | | of the output string | ||||
* | | | Unicode: resize_compact() and resize_inplace() fills also the Unicode strings | Victor Stinner | 2012-10-03 | 1 | -5/+33 |
| | | | | | | | | | | | | with invalid bytes in debug mode, as done by PyUnicode_New() | ||||
* | | | Issue #15609: Fix refleak introduced by my last optimization | Victor Stinner | 2012-10-02 | 1 | -1/+4 |
| | | | |||||
* | | | Issue #15609: Optimize str%args for integer argument | Victor Stinner | 2012-10-02 | 1 | -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 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. |