summaryrefslogtreecommitdiffstats
path: root/Objects/bytearrayobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
|
* Issue #27506: Support bytes/bytearray.translate() delete as keyword argumentMartin Panter2016-08-271-8/+5
| | | | Patch by Xiang Zhang.
* Issue #27704: Optimized creating bytes and bytearray from byte-like objectsSerhiy Storchaka2016-08-151-10/+8
| | | | | and iterables. Speed up to 3 times for short objects. Original patch by Naoki Inada.
* Issue #27507: Merge overflow check from 3.5Martin Panter2016-07-181-1/+11
|\
| * Issue #27507: Check for integer overflow in bytearray.extend()Martin Panter2016-07-181-1/+11
| | | | | | | | Patch by Xiang Zhang.
* | Issue #27473: Fixed possible integer overflow in bytes and bytearraySerhiy Storchaka2016-07-101-12/+9
|\ \ | |/ | | | | concatenations. Patch by Xiang Zhang.
| * Issue #27473: Fixed possible integer overflow in bytes and bytearraySerhiy Storchaka2016-07-101-12/+9
| | | | | | | | concatenations. Patch by Xiang Zhang.
* | Issue #27443: __length_hint__() of bytearray itearator no longer returnSerhiy Storchaka2016-07-031-1/+5
|\ \ | |/ | | | | negative integer for resized bytearray.
| * Issue #27443: __length_hint__() of bytearray itearator no longer returnSerhiy Storchaka2016-07-031-1/+5
| | | | | | | | negative integer for resized bytearray.
* | Backed out changeset b0087e17cd5e (issue #26765)Serhiy Storchaka2016-07-031-12/+67
| | | | | | | | For unknown reasons it perhaps caused a crash on 32-bit Windows (issue #).
* | Issue #26765: Moved wrappers for bytes and bytearray methods to common headerSerhiy Storchaka2016-07-011-67/+12
| | | | | | | | file.
* | Issue #27007: The fromhex() class methods of bytes and bytearray subclassesSerhiy Storchaka2016-07-011-4/+8
| | | | | | | | now return an instance of corresponding subclass.
* | Issue #27039: Fixed bytearray.remove() for values greater than 127.Serhiy Storchaka2016-05-161-5/+2
|\ \ | |/ | | | | Based on patch by Joe Jevnik.
| * Issue #27039: Fixed bytearray.remove() for values greater than 127.Serhiy Storchaka2016-05-161-7/+4
| | | | | | | | Patch by Joe Jevnik.
* | Issue #26765: Moved common code for the replace() method of bytes and bytearraySerhiy Storchaka2016-05-051-500/+3
| | | | | | | | to a template file.
* | Issue #26765: Moved common code and docstrings for bytes and bytearray methodsSerhiy Storchaka2016-05-041-328/+24
| | | | | | | | to bytes_methods.c.
* | Got rid of redundand "self" parameter declarations.Serhiy Storchaka2016-05-021-33/+14
| | | | | | | | Argument Clinic is now able to infer all needed information.
* | Issue #26778: Fixed "a/an/and" typos in code comment, documentation and errorSerhiy Storchaka2016-04-171-1/+1
|\ \ | |/ | | | | messages.
| * Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
| |
* | Issue #26766: Remove redundant bytearray_format() from bytearrayobject.cBerker Peksag2016-04-151-14/+1
| |
* | Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-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 Storchaka2016-03-301-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 Stinner2016-03-211-9/+19
| | | | | | | | | | Issue #26574: Optimize bytes.replace(b'', b'.') and bytearray.replace(b'', b'.'): up to 80% faster. Patch written by Josh Snider.
* | Oops, revert unwanted change used to create an exampleVictor Stinner2016-03-151-1/+0
| | | | | | | | Issue #26564.
* | On memory error, dump the memory block tracebackVictor Stinner2016-03-151-0/+1
| | | | | | | | | | | | Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a memory block was allocated on memory block. Use the tracemalloc module to get the traceback.
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-4/+4
| | | | | | | | private functions.
* | Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-1/+1
|\ \ | |/ | | | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
| * Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-1/+1
| | | | | | | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
* | Issue #24821: Refactor STRINGLIB(fastsearch_memchr_1char) and split it onSerhiy Storchaka2015-11-141-10/+9
| | | | | | | | | | STRINGLIB(find_char) and STRINGLIB(rfind_char) that can be used independedly without special preconditions.
* | Issue #25401: Remove now unused hex_digit_to_int() functionVictor Stinner2015-10-141-16/+0
| |
* | Optimize bytes.fromhex() and bytearray.fromhex()Victor Stinner2015-10-141-42/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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 % argsVictor Stinner2015-10-141-17/+5
|/ | | | | | | | | | | | | | 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.
* Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()Serhiy Storchaka2015-07-201-3/+7
| | | | for single-byte argument on Linux.
* Issue #24467: Fixed possible buffer over-read in bytearray. The bytearraySerhiy Storchaka2015-06-291-1/+3
|\ | | | | | | | | object now always allocates place for trailing null byte and it's buffer now is always null-terminated.
| * Issue #24467: Fixed possible buffer over-read in bytearray. The bytearraySerhiy Storchaka2015-06-291-1/+3
| | | | | | | | | | object now always allocates place for trailing null byte and it's buffer now is always null-terminated.
* | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-3/+7
|\ \ | |/ | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
| * Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-3/+7
| | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
* | Specify default values of semantic booleans in Argument Clinic generated ↵Serhiy Storchaka2015-05-301-2/+2
| | | | | | | | signatures as booleans.
* | Issue #23985: Fix a possible buffer overrun when deleting a slice from the ↵Antoine Pitrou2015-05-191-6/+2
|\ \ | |/ | | | | | | | | front of a bytearray and then appending some other bytes data. Patch by Martin Panter.
| * Issue #23985: Fix a possible buffer overrun when deleting a slice from the ↵Antoine Pitrou2015-05-191-6/+2
| | | | | | | | | | | | front of a bytearray and then appending some other bytes data. Patch by Martin Panter.
* | Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.Gregory P. Smith2015-04-251-0/+15
| | | | | | | | | | | | | | Also updates a few internal implementations of the same thing to use the new built-in code. Contributed by Arnon Yaari.
* | Remove local dead code. In both blocks dir is always greater 0.Christian Heimes2015-04-181-2/+1
| |
* | Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings2015-04-141-10/+15
| |
* | Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-729/+27
| |
* | Issue #23573: Fix bytes.rfind() and bytearray.rfind() on WindowsVictor Stinner2015-03-251-1/+2
| | | | | | | | | | | | | | Windows has no memrchr() function. This change is only a workaround, the optimization must be reenabled on other platforms.
* | Issue #23573: Increased performance of string search operations (str.find,Serhiy Storchaka2015-03-241-9/+24
| | | | | | | | | | str.index, str.count, the in operator, str.split, str.partition) with arguments of different kinds (UCS1, UCS2, UCS4).
* | Issue #14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo()Stefan Krah2015-02-031-8/+7
| | | | | | | | | | and bytearray_getbuffer(). Both functions now raise BufferError in that case.
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-80/+62
|\ \ | |/ | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-58/+34
| | | | | | | | and PyObject_AsWriteBuffer().
* | Issue20284: Implement PEP461Ethan Furman2015-01-241-1/+42
| |