Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #26765: Ensure that bytes- and unicode-specific stringlib files are used | Serhiy Storchaka | 2016-05-16 | 6 | -12/+15 |
| | | | | with correct type. | ||||
* | Issue #26765: Moved common code for the replace() method of bytes and bytearray | Serhiy Storchaka | 2016-05-05 | 1 | -57/+521 |
| | | | | to a template file. | ||||
* | Issue #26765: Moved common code and docstrings for bytes and bytearray methods | Serhiy Storchaka | 2016-05-04 | 2 | -103/+0 |
| | | | | to bytes_methods.c. | ||||
* | Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error | Serhiy Storchaka | 2016-04-17 | 1 | -1/+1 |
|\ | | | | | | | messages. | ||||
| * | Issue #26778: Fixed "a/an/and" typos in code comment and documentation. | Serhiy Storchaka | 2016-04-17 | 1 | -1/+1 |
| | | |||||
* | | Issue #26057: Got rid of nonneeded use of PyUnicode_FromObject(). | Serhiy Storchaka | 2016-04-13 | 1 | -11/+2 |
| | | |||||
* | | Issue #24821: Refactor STRINGLIB(fastsearch_memchr_1char) and split it on | Serhiy Storchaka | 2015-11-14 | 1 | -63/+87 |
| | | | | | | | | | | STRINGLIB(find_char) and STRINGLIB(rfind_char) that can be used independedly without special preconditions. | ||||
* | | Optimize error handlers of ASCII and Latin1 encoders when the replacement | Victor Stinner | 2015-10-09 | 1 | -11/+7 |
| | | | | | | | | | | | | | | | | | | | | | | string is pure ASCII: use _PyBytesWriter_WriteBytes(), don't check individual character. Cleanup unicode_encode_ucs1(): * Rename repunicode to rep * Clear rep object on error * Factorize code between bytes and unicode path | ||||
* | | Add _PyBytesWriter_WriteBytes() to factorize the code | Victor Stinner | 2015-10-09 | 1 | -11/+11 |
| | | |||||
* | | _PyBytesWriter: simplify code to avoid "prealloc" parameters | Victor Stinner | 2015-10-09 | 1 | -8/+12 |
| | | | | | | | | | | Substract preallocate bytes from min_size before calling _PyBytesWriter_Prepare(). | ||||
* | | Optimize backslashreplace error handler | Victor Stinner | 2015-10-08 | 1 | -2/+16 |
| | | | | | | | | | | | | | | | | | | | | Issue #25318: Optimize backslashreplace and xmlcharrefreplace error handlers in UTF-8 encoder. Optimize also backslashreplace error handler for ASCII and Latin1 encoders. Use the new _PyBytesWriter API to optimize these error handlers for the encoders. It avoids to create an exception and call the slow implementation of the error handler. | ||||
* | | Issue #25318: Add _PyBytesWriter API | Victor Stinner | 2015-10-08 | 1 | -63/+21 |
| | | | | | | | | | | | | | | | | | | | | | | Add a new private API to optimize Unicode encoders. It uses a small buffer allocated on the stack and supports overallocation. Use _PyBytesWriter API for UCS1 (ASCII and Latin1) and UTF-8 encoders. Enable overallocation for the UTF-8 encoder with error handlers. unicode_encode_ucs1(): initialize collend to collstart+1 to not check the current character twice, we already know that it is not ASCII. | ||||
* | | Issue #25267: The UTF-8 encoder is now up to 75 times as fast for error | Victor Stinner | 2015-10-01 | 1 | -51/+96 |
| | | | | | | | | | | handlers: ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``. Patch co-written with Serhiy Storchaka. | ||||
* | | Fixed an incorrect comment. | Eric V. Smith | 2015-08-26 | 1 | -1/+1 |
|/ | |||||
* | Fixed typos in comments. | Serhiy Storchaka | 2015-05-18 | 1 | -4/+4 |
|\ | |||||
| * | Fixed typos in comments. | Serhiy Storchaka | 2015-05-18 | 1 | -2/+2 |
| | | |||||
* | | Issue #15027: The UTF-32 encoder is now 3x to 7x faster. | Serhiy Storchaka | 2015-05-12 | 1 | -0/+87 |
| | | |||||
* | | Issue #23573: Increased performance of string search operations (str.find, | Serhiy Storchaka | 2015-03-24 | 2 | -23/+4 |
| | | | | | | | | | | str.index, str.count, the in operator, str.split, str.partition) with arguments of different kinds (UCS1, UCS2, UCS4). | ||||
* | | Removed unintentional trailing spaces in non-external and non-generated C files. | Serhiy Storchaka | 2015-03-18 | 1 | -1/+1 |
|/ | |||||
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -1/+8 |
| | | | | and PyObject_AsWriteBuffer(). | ||||
* | Issue #22581: Use more "bytes-like object" throughout the docs and comments. | Serhiy Storchaka | 2014-12-05 | 1 | -3/+3 |
| | |||||
* | s/stringobject/bytesobject/ (closes #22036) | Benjamin Peterson | 2014-07-24 | 1 | -1/+1 |
| | | | | Patch by Martin Matusiak. | ||||
* | merge 3.3 | Benjamin Peterson | 2014-03-30 | 1 | -19/+19 |
|\ | |||||
| * | merge 3.2 | Benjamin Peterson | 2014-03-30 | 1 | -19/+19 |
| |\ | |||||
| | * | fix expandtabs overflow detection to be consistent and not rely on signed ↵ | Benjamin Peterson | 2014-03-30 | 1 | -19/+19 |
| | | | | | | | | | | | | overflow | ||||
| | * | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵ | Antoine Pitrou | 2013-02-09 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag). | ||||
| | * | Issue #14700: Fix buggy overflow checks for large precision and width in ↵ | Mark Dickinson | 2012-10-28 | 2 | -18/+13 |
| | | | | | | | | | | | | new-style and old-style formatting. | ||||
| * | | fix format spec recursive expansion (closes #19729) | Benjamin Peterson | 2013-11-27 | 1 | -2/+4 |
| | | | |||||
* | | | Reverted changeset b72c5573c5e7 (issue #15027). | Serhiy Storchaka | 2014-01-04 | 1 | -87/+0 |
| | | | |||||
* | | | Issue #15027: Rewrite the UTF-32 encoder. It is now 1.6x to 3.5x faster. | Serhiy Storchaka | 2014-01-04 | 1 | -0/+87 |
| | | | |||||
* | | | Remove dead code committed in issue #12892. | Serhiy Storchaka | 2013-11-19 | 1 | -104/+0 |
| | | | |||||
* | | | Issue #12892: The utf-16* and utf-32* codecs now reject (lone) surrogates. | Serhiy Storchaka | 2013-11-19 | 1 | -16/+182 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The utf-16* and utf-32* encoders no longer allow surrogate code points (U+D800-U+DFFF) to be encoded. The utf-32* decoders no longer decode byte sequences that correspond to surrogate code points. The surrogatepass error handler now works with the utf-16* and utf-32* codecs. Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu. | ||||
* | | | #17806: Added keyword-argument support for "tabsize" to str/bytes.expandtabs(). | Ezio Melotti | 2013-11-16 | 1 | -3/+5 |
| | | | |||||
* | | | Issue #18408: Fix bytearrayiter.partition()/rpartition(), handle | Victor Stinner | 2013-10-29 | 1 | -0/+10 |
| | | | | | | | | | | | | PyByteArray_FromStringAndSize() failure (ex: on memory allocation failure) | ||||
* | | | Issue #18701: Remove support of old CPython versions (<3.0) from C code. | Serhiy Storchaka | 2013-08-16 | 1 | -5/+0 |
| | | | |||||
* | | | merge | Raymond Hettinger | 2013-08-14 | 1 | -9/+0 |
|\ \ \ | |/ / | |||||
| * | | Issue 18719: Remove a false optimization | Raymond Hettinger | 2013-08-14 | 1 | -9/+0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove an unused early-out test from the critical path for dict and set lookups. When the strings already have matching lengths, kinds, and hashes, there is no additional information gained by checking the first characters (the probability of a mismatch is already known to be less than 1 in 2**64). | ||||
* | | | Issue #18722: Remove uses of the "register" keyword in C code. | Antoine Pitrou | 2013-08-13 | 4 | -9/+9 |
| | | | |||||
* | | | rewrite the parsing of field names to be more consistent wrt recursive expansion | Benjamin Peterson | 2013-05-17 | 1 | -62/+53 |
| | | | |||||
* | | | merge 3.3 | Benjamin Peterson | 2013-05-17 | 1 | -2/+8 |
|\ \ \ | |/ / | |||||
| * | | only recursively expand in the format spec (closes #17644) | Benjamin Peterson | 2013-05-17 | 1 | -2/+8 |
| | | | |||||
* | | | Merge removal of trailing whitespace from 3.3. | Ezio Melotti | 2013-04-21 | 1 | -7/+7 |
|\ \ \ | |/ / | |||||
| * | | Remove trailing whitespace. | Ezio Melotti | 2013-04-21 | 1 | -7/+7 |
| | | | |||||
* | | | Close #17694: Add minimum length to _PyUnicodeWriter | Victor Stinner | 2013-04-17 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add also min_char attribute to _PyUnicodeWriter structure (currently unused) * _PyUnicodeWriter_Init() has no more argument (except the writer itself): min_length and overallocate must be set explicitly * In error handlers, only enable overallocation if the replacement string is longer than 1 character * CJK decoders don't use overallocation anymore * Set min_length, instead of preallocating memory using _PyUnicodeWriter_Prepare(), in many decoders * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow | ||||
* | | | stringlib: remove unused STRINGLIB_RESIZE macro | Victor Stinner | 2013-04-14 | 7 | -7/+0 |
| | | | |||||
* | | | Issue #16061: Speed up str.replace() for replacing 1-character strings. | Serhiy Storchaka | 2013-04-13 | 1 | -0/+53 |
| | | | |||||
* | | | Close #13126: "Simplify" FASTSEARCH() code to help the compiler to emit more | Victor Stinner | 2013-04-07 | 1 | -3/+5 |
| | | | | | | | | | | | | | | | | | | | | | efficient machine code. Patch written by Antoine Pitrou. Without this change, str.find() was 10% slower than str.rfind() in the worst case. | ||||
* | | | Add _PyUnicodeWriter_WriteSubstring() function | Victor Stinner | 2013-04-02 | 1 | -12/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Write a function to enable more optimizations: * If the substring is the whole string and overallocation is disabled, just keep a reference to the string, don't copy characters * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when possible | ||||
* | | | Remove unused defines. | Serhiy Storchaka | 2013-02-23 | 1 | -6/+0 |
|\ \ \ | |/ / | |||||
| * | | Remove unused defines. | Serhiy Storchaka | 2013-02-23 | 1 | -6/+0 |
| | | |