Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #14783: Merge changes from 3.3. | Chris Jerdonek | 2012-10-07 | 4 | -10/+20 |
|\ | |||||
| * | Issue #14783: Merge changes from 3.2. | Chris Jerdonek | 2012-10-07 | 4 | -10/+20 |
| |\ | |||||
| | * | Issue #14783: Improve int() docstring and also str(), range(), and slice(). | Chris Jerdonek | 2012-10-07 | 4 | -9/+19 |
| | | | | | | | | | | | | | | | | | | 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 #16148: Small improvements and cleanup. Added version information | Armin Ronacher | 2012-10-07 | 1 | -7/+8 |
| | | | | | | | | | | | | to docs. | ||||
* | | | 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: port fix from 3.3 | Mark Dickinson | 2012-10-06 | 1 | -3/+2 |
|\ \ \ | |/ / | |||||
| * | | Issue #16096: Fix signed overflow in Objects/longobject.c. Thanks Serhiy ↵ | Mark Dickinson | 2012-10-06 | 1 | -3/+2 |
| | | | | | | | | | | | | Storchaka. | ||||
* | | | Issue #16096: Merge fixes from 3.3. | Mark Dickinson | 2012-10-06 | 2 | -22/+13 |
|\ \ \ | |/ / | |||||
| * | | Issue #16096: Fix several occurrences of potential signed integer overflow. ↵ | Mark Dickinson | 2012-10-06 | 2 | -22/+13 |
| | | | | | | | | | | | | Thanks Serhiy Storchaka. | ||||
* | | | and another one | Christian Heimes | 2012-10-06 | 1 | -2/+2 |
| | | | |||||
* | | | move var declaration to top of block to fix compilation on Windows, fixes ↵ | Christian Heimes | 2012-10-06 | 1 | -2/+4 |
| | | | | | | | | | | | | a7ec0a1b0f7c | ||||
* | | | Fixed a missing incref introduced by a7ec0a1b0f7c | Armin Ronacher | 2012-10-06 | 1 | -1/+1 |
| | | | |||||
* | | | Added notimplemented_dealloc for better error reporting | Armin Ronacher | 2012-10-06 | 1 | -1/+10 |
| | | | |||||
* | | | Issue #16148: implemented PEP 424 | Armin Ronacher | 2012-10-06 | 5 | -35/+58 |
| | | | |||||
* | | | In debug mode, unicode_write_cstr() now checks that non-ASCII characters are | Victor Stinner | 2012-10-05 | 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-04 | 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() | ||||
* | | | long_to_decimal_string_internal() doesn't need to write the final NULL character | Victor Stinner | 2012-10-04 | 1 | -1/+0 |
| | | | |||||
* | | | 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-01 | 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 | ||||
* | | | upgrade to UCD 6.2 | Benjamin Peterson | 2012-09-29 | 1 | -3/+10 |
|/ / | |||||
* | | Fix typo. | Ezio Melotti | 2012-09-28 | 1 | -2/+2 |
| | | |||||
* | | Issue #16060: Fix a double DECREF in int() implementation. Thanks Serhiy ↵ | Mark Dickinson | 2012-09-27 | 1 | -4/+3 |
| | | | | | | | | Storchaka. | ||||
* | | 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 15959: Merge from 3.2. | Mark Dickinson | 2012-09-20 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue 15959: Fix type mismatch for quick{_neg}_int_allocs. Thanks Serhiy ↵ | Mark Dickinson | 2012-09-20 | 1 | -1/+1 |
| | | | | | | | | Storchaka. | ||||
* | | Issue #15144: Fix possible integer overflow when handling pointers as ↵ | Antoine Pitrou | 2012-09-20 | 5 | -32/+18 |
| | | | | | | | | | | | | integer values, by using Py_uintptr_t instead of size_t. Patch by Serhiy Storchaka. | ||||
* | | Silence compiler warnings on Solaris 10 via explicit (void *) casts. | Trent Nelson | 2012-09-19 | 1 | -3/+3 |
|\ \ | |/ | |||||
| * | Silence compiler warnings on Solaris 10 via explicit (void *) casts. | Trent Nelson | 2012-09-19 | 1 | -3/+3 |
| | | | | | | | | (Compiler: Solaris Studio 12.3) | ||||
* | | Fix out of bounds read in long_new() for empty bytes with an explicit base. ↵ | Christian Heimes | 2012-09-12 | 1 | -2/+2 |
|\ \ | |/ | | | | | int(b'', somebase) calls PyLong_FromString() with char* of length 1 but the function accesses the first argument at offset 1. CID 715359 | ||||
| * | Fix out of bounds read in long_new() for empty bytes with an explicit base. ↵ | Christian Heimes | 2012-09-12 | 1 | -2/+2 |
| | | | | | | | | int(b'', somebase) calls PyLong_FromString() with char* of length 1 but the function accesses the first argument at offset 1. CID 715359 | ||||
* | | Issue #15900: Fixed reference leak in PyUnicode_TranslateCharmap() | Christian Heimes | 2012-09-11 | 1 | -6/+5 |
| | | |||||
* | | Fixed memory leak in error branch of object_repr which may leak a reference ↵ | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
|\ \ | |/ | | | | | to mod when type_qualname returns NULL. CID 715371 | ||||
| * | Fixed memory leak in error branch of object_repr which may leak a reference ↵ | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
| | | | | | | | | to mod when type_name returns NULL. CID 715371 | ||||
* | | Fixed memory leak in error branch of formatfloat(). CID 719687 | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
| | | |||||
* | | Fixed possible reference leak to mod when type_name() returns NULL | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
|\ \ | |/ | |||||
| * | Fixed possible reference leak to mod when type_name() returns NULL | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
| | | |||||
* | | PyTuple_Pack() was missing va_end() in its error branch which lead to a ↵ | Christian Heimes | 2012-09-10 | 1 | -1/+3 |
|\ \ | |/ | | | | | resource leak. |