Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Issue #25270: Prevent codecs.escape_encode() from raising SystemError when ↵ | Berker Peksag | 2016-09-16 | 1 | -5/+14 | |
| | | | | | | | | an empty bytestring is passed | |||||
* | | Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly ↵ | Christian Heimes | 2016-09-13 | 1 | -10/+10 | |
| | | | | | | | | optimize memcpy(). | |||||
* | | remove all usage of Py_LOCAL | Benjamin Peterson | 2016-09-09 | 1 | -1/+1 | |
| | | ||||||
* | | #27364: Deprecate invalid escape strings in str/byutes. | R David Murray | 2016-09-08 | 1 | -1/+2 | |
| | | | | | | | | Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter. | |||||
* | | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Raymond Hettinger | 2016-08-30 | 1 | -2/+2 | |
| | | ||||||
* | | Issue #27506: Support bytes/bytearray.translate() delete as keyword argument | Martin Panter | 2016-08-27 | 1 | -6/+4 | |
| | | | | | | | | Patch by Xiang Zhang. | |||||
* | | Issue #27704: Optimized creating bytes and bytearray from byte-like objects | Serhiy Storchaka | 2016-08-15 | 1 | -10/+8 | |
| | | | | | | | | | | and iterables. Speed up to 3 times for short objects. Original patch by Naoki Inada. | |||||
* | | Issue #27473: Fixed possible integer overflow in bytes and bytearray | Serhiy Storchaka | 2016-07-10 | 1 | -4/+2 | |
|\ \ | |/ | | | | | concatenations. Patch by Xiang Zhang. | |||||
| * | Issue #27473: Fixed possible integer overflow in bytes and bytearray | Serhiy Storchaka | 2016-07-10 | 1 | -4/+2 | |
| | | | | | | | | concatenations. Patch by Xiang Zhang. | |||||
* | | Issue #27460: Unified error messages in bytes constructor for integers | Serhiy Storchaka | 2016-07-06 | 1 | -2/+2 | |
| | | | | | | | | in and out of the Py_ssize_t range. Patch by Xiang Zhang. | |||||
* | | Backed out changeset b0087e17cd5e (issue #26765) | Serhiy Storchaka | 2016-07-03 | 1 | -11/+71 | |
| | | | | | | | | For unknown reasons it perhaps caused a crash on 32-bit Windows (issue #). | |||||
* | | Issue #26765: Moved wrappers for bytes and bytearray methods to common header | Serhiy Storchaka | 2016-07-01 | 1 | -71/+11 | |
| | | | | | | | | file. | |||||
* | | Issue #27007: The fromhex() class methods of bytes and bytearray subclasses | Serhiy Storchaka | 2016-07-01 | 1 | -1/+6 | |
| | | | | | | | | now return an instance of corresponding subclass. | |||||
* | | Issue #27125: Merge typo fixes from 3.5 | Martin Panter | 2016-05-30 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | Issue #27125: Remove duplicated words from documentation and comments | Martin Panter | 2016-05-30 | 1 | -1/+1 | |
| | | ||||||
* | | Issue #26765: Moved common code for the replace() method of bytes and bytearray | Serhiy Storchaka | 2016-05-05 | 1 | -505/+3 | |
| | | | | | | | | to a template file. | |||||
* | | Issue #26765: Moved common code and docstrings for bytes and bytearray methods | Serhiy Storchaka | 2016-05-04 | 1 | -336/+26 | |
| | | | | | | | | to bytes_methods.c. | |||||
* | | Got rid of redundand "self" parameter declarations. | Serhiy Storchaka | 2016-05-02 | 1 | -26/+20 | |
| | | | | | | | | Argument Clinic is now able to infer all needed information. | |||||
* | | Issue #25349, #26249: Fix memleak in formatfloat() | Victor Stinner | 2016-04-26 | 1 | -0/+1 | |
| | | ||||||
* | | Issue #26766: Fix _PyBytesWriter_Finish() | Victor Stinner | 2016-04-15 | 1 | -1/+6 | |
| | | | | | | | | | | | | | | Return a bytearray object when bytearray is requested and when the small buffer is used. Fix also test_bytes: bytearray%args must return a bytearray type. | |||||
* | | Issue #26764: Fixed SystemError in bytes.__rmod__. | Serhiy Storchaka | 2016-04-15 | 1 | -6/+4 | |
| | | ||||||
* | | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF | Serhiy Storchaka | 2016-04-10 | 1 | -1/+1 | |
|\ \ | |/ | | | | | in places where Py_DECREF was used. | |||||
| * | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF | Serhiy Storchaka | 2016-04-10 | 1 | -1/+1 | |
| | | | | | | | | in places where Py_DECREF was used. | |||||
* | | Issue #17339: Improved TypeError message in bytes constructor. | Serhiy Storchaka | 2016-04-10 | 1 | -16/+15 | |
| | | ||||||
* | | Issue #22570: Renamed Py_SETREF to Py_XSETREF. | Serhiy Storchaka | 2016-04-06 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | Issue #22570: Renamed Py_SETREF to Py_XSETREF. | Serhiy Storchaka | 2016-04-06 | 1 | -1/+1 | |
| | | ||||||
* | | Issue #26494: Fixed crash on iterating exhausting iterators. | Serhiy Storchaka | 2016-03-30 | 1 | -1/+1 | |
|\ \ | |/ | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator. | |||||
| * | Issue #26494: Fixed crash on iterating exhausting iterators. | Serhiy Storchaka | 2016-03-30 | 1 | -1/+1 | |
| | | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator. | |||||
* | | Optimize bytes.replace(b'', b'.') | Victor Stinner | 2016-03-21 | 1 | -9/+19 | |
| | | | | | | | | | | Issue #26574: Optimize bytes.replace(b'', b'.') and bytearray.replace(b'', b'.'): up to 80% faster. Patch written by Josh Snider. | |||||
* | | Issue #25923: Added more const qualifiers to signatures of static and ↵ | Serhiy Storchaka | 2015-12-25 | 1 | -1/+1 | |
| | | | | | | | | private functions. | |||||
* | | Issue #20440: Massive replacing unsafe attribute setting code with special | Serhiy Storchaka | 2015-12-24 | 1 | -2/+1 | |
|\ \ | |/ | | | | | macro Py_SETREF. | |||||
| * | Issue #20440: Massive replacing unsafe attribute setting code with special | Serhiy Storchaka | 2015-12-24 | 1 | -2/+1 | |
| | | | | | | | | macro Py_SETREF. | |||||
* | | Issue #25766: Special method __bytes__() now works in str subclasses. | Serhiy Storchaka | 2015-12-20 | 1 | -6/+12 | |
|\ \ | |/ | ||||||
| * | Issue #25766: Special method __bytes__() now works in str subclasses. | Serhiy Storchaka | 2015-12-20 | 1 | -6/+12 | |
| | | ||||||
* | | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -4/+4 | |
|\ \ | |/ | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | |||||
| * | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -4/+4 | |
| |\ | | | | | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | |||||
| | * | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -4/+4 | |
| | | | | | | | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | |||||
* | | | Issue #24821: Refactor STRINGLIB(fastsearch_memchr_1char) and split it on | Serhiy Storchaka | 2015-11-14 | 1 | -10/+9 | |
| | | | | | | | | | | | | | | | STRINGLIB(find_char) and STRINGLIB(rfind_char) that can be used independedly without special preconditions. | |||||
* | | | Use _PyBytesWriter in _PyBytes_FromIterator() | Victor Stinner | 2015-10-14 | 1 | -19/+18 | |
| | | | ||||||
* | | | Add _PyBytesWriter_Resize() function | Victor Stinner | 2015-10-14 | 1 | -18/+30 | |
| | | | | | | | | | | | | This function gives a control to the buffer size without using min_size. | |||||
* | | | Factorize _PyBytes_FromList() and _PyBytes_FromTuple() code using a C macro | Victor Stinner | 2015-10-14 | 1 | -54/+35 | |
| | | | ||||||
* | | | Split PyBytes_FromObject() into subfunctions | Victor Stinner | 2015-10-14 | 1 | -71/+114 | |
| | | | ||||||
* | | | Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI | Victor Stinner | 2015-10-14 | 1 | -58/+73 | |
| | | | | | | | | | | | | | | | | | | | | | * Don't overallocate by 400% when recode is needed: only overallocate on demand using _PyBytesWriter. * Use _PyLong_DigitValue to convert hexadecimal digit to int * Create _PyBytes_DecodeEscapeRecode() subfunction | |||||
* | | | _PyBytesWriter_Alloc(): only use 10 bytes of the small buffer in debug mode to | Victor Stinner | 2015-10-14 | 1 | -1/+13 | |
| | | | | | | | | | | | | enhance code to detect buffer under- and overflow. | |||||
* | | | Optimize bytes.fromhex() and bytearray.fromhex() | Victor Stinner | 2015-10-14 | 1 | -52/+76 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now between 2x and 3.5x faster. Changes: * Use a fast-path working on a char* string for ASCII string * Use a slow-path for non-ASCII string * Replace slow hex_digit_to_int() function with a O(1) lookup in _PyLong_DigitValue precomputed table * Use _PyBytesWriter API to handle the buffer * Add unit tests to check the error position in error messages | |||||
* | | | Optimize bytearray % args | Victor Stinner | 2015-10-14 | 1 | -18/+23 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #25399: Don't create temporary bytes objects: modify _PyBytes_Format() to create work directly on bytearray objects. * Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something outside CPython uses it * _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so bytearray_format() doesn't need tot create a temporary input bytes object * Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to _PyBytesWriter, to create a bytearray buffer instead of a bytes buffer Most formatting operations are now between 2.5 and 5 times faster. | |||||
* | | | Add use_bytearray attribute to _PyBytesWriter | Victor Stinner | 2015-10-14 | 1 | -28/+65 | |
| | | | | | | | | | | | | | | | Issue #25399: Add a new use_bytearray attribute to _PyBytesWriter to use a bytearray buffer, instead of using a bytes object. | |||||
* | | | Rewrite PyBytes_FromFormatV() using _PyBytesWriter API | Victor Stinner | 2015-10-13 | 1 | -171/+165 | |
| | | | | | | | | | | | | | | | | | | | | | * Add much more unit tests on PyBytes_FromFormatV() * Remove the first loop to compute the length of the output string * Use _PyBytesWriter to handle the bytes buffer, use overallocation * Cleanup the code to make simpler and easier to review | |||||
* | | | Fix compilation error in _PyBytesWriter_WriteBytes() on Windows | Victor Stinner | 2015-10-12 | 1 | -1/+3 | |
| | | | ||||||
* | | | Writer APIs: use empty string singletons | Victor Stinner | 2015-10-12 | 1 | -9/+14 | |
| | | | | | | | | | | | | | | | Modify _PyBytesWriter_Finish() and _PyUnicodeWriter_Finish() to return the empty bytes/Unicode string if the string is empty. |