summaryrefslogtreecommitdiffstats
path: root/Objects/bytearrayobject.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff ↵Antoine Pitrou2014-11-021-7/+14
|\ \ | |/ | | | | bytes on a 32-bit platform.
| * Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff ↵Antoine Pitrou2014-11-021-7/+14
| | | | | | | | bytes on a 32-bit platform.
* | #16518: Bring error messages in harmony with docs ("bytes-like object")R David Murray2014-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | Some time ago we changed the docs to consistently use the term 'bytes-like object' in all the contexts where bytes, bytearray, memoryview, etc are used. This patch (by Ezio Melotti) completes that work by changing the error messages that previously reported that certain types did "not support the buffer interface" to instead say that a bytes-like object is required. (The glossary entry for bytes-like object references the discussion of the buffer protocol in the docs.)
* | Issue #22077: Improve index error messages for bytearrays, bytes, lists, andTerry Jan Reedy2014-08-021-2/+6
| | | | | | | | | | tuples by adding 'or slices'. Added ', not <typename' for bytearrays. Original patch by Claudiu Popa.
* | Rerun AC, silence pointer conversion warnings.Martin v. Löwis2014-07-271-2/+2
| |
* | Issue #20179: Apply Argument Clinic to bytes and bytearray.Martin v. Löwis2014-07-271-323/+1149
| | | | | | | | Patch by Tal Einat.
* | Issue #21233: Revert bytearray(int) optimization using calloc()Victor Stinner2014-06-021-14/+2
| |
* | Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),Victor Stinner2014-05-021-2/+14
|/ | | | | | PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now using ``calloc()`` instead of ``malloc()`` for large objects which is faster and use less memory (until the bytearray buffer is filled with data).
* Make the various iterators' "setstate" sliently and consistently clip theKristján Valur Jónsson2014-03-051-3/+7
|\ | | | | | | | | index. This avoids the possibility of setting an iterator to an invalid state.
| * Make the various iterators' "setstate" sliently and consistently clip theKristján Valur Jónsson2014-03-051-3/+7
| | | | | | | | | | index. This avoids the possibility of setting an iterator to an invalid state.
* | Close #19568: Fix bytearray_setslice_linear(), fix handling ofVictor Stinner2013-11-211-37/+63
| | | | | | | | | | | | | | | | | | | | PyByteArray_Resize() failure: leave the bytearray object in an consistent state. If growth < 0, handling the memory allocation failure is tricky here because the bytearray object has already been modified. If lo != 0, the operation is completed, but a MemoryError is still raised and the memory block is not shrinked. If lo == 0, the bytearray is restored in its previous state and a MemoryError is raised.
* | #17806: Added keyword-argument support for "tabsize" to str/bytes.expandtabs().Ezio Melotti2013-11-161-1/+1
| |
* | Hopefully fix Windows compilation error following 499a96611baaAntoine Pitrou2013-10-051-10/+10
| |
* | Issue #19087: Improve bytearray allocation in order to allow cheap popping ↵Antoine Pitrou2013-10-051-145/+163
| | | | | | | | of data at the front (slice deletion).
* | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-6/+6
| |
* | Propagate error when PyByteArray_Resize() fails in bytearray_translate()Christian Heimes2013-07-211-1/+4
|\ \ | |/ | | | | CID 715334
| * Propagate error when PyByteArray_Resize() fails in bytearray_translate()Christian Heimes2013-07-211-1/+4
| | | | | | | | CID 715334
* | Fix compilation on WindowsChristian Heimes2012-11-031-1/+1
|\ \ | |/
| * Fix compilation on WindowsChristian Heimes2012-11-031-1/+1
| |\
| | * Fix compilation on WindowsChristian Heimes2012-11-031-1/+1
| | |
| * | #8401: merge with 3.2.Ezio Melotti2012-11-031-0/+6
| |\ \ | | |/
* | | #8401: merge with 3.3.Ezio Melotti2012-11-031-0/+6
|\ \ \ | | |/ | |/|
| * | #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an ↵Ezio Melotti2012-11-031-0/+6
| | | | | | | | | | | | error.
* | | Issue #15958: bytes.join and bytearray.join now accept arbitrary buffer objects.Antoine Pitrou2012-10-161-67/+5
| | |
* | | Issue #16148: implemented PEP 424Armin Ronacher2012-10-061-1/+1
| |/ |/|
* | Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays.Stefan Krah2012-07-281-1/+1
| |
* | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵Antoine Pitrou2012-04-041-2/+2
| | | | | | | | the stable ABI.
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-2/+34
| |
* | Issue #13019: Fix potential reference leaks in bytearray.extend().Antoine Pitrou2012-04-011-2/+6
|\ \ | |/ | | | | Patch by Suman Saha.
| * Issue #13019: Fix potential reference leaks in bytearray.extend().Antoine Pitrou2012-04-011-2/+6
| | | | | | | | Patch by Suman Saha.
* | #14081: The sep and maxsplit parameter to str.split, bytes.split, and ↵Ezio Melotti2012-02-261-8/+12
| | | | | | | | bytearray.split may now be passed as keyword arguments.
* | Issue #11231: Fix bytes and bytearray docstringsVictor Stinner2011-12-171-7/+5
|\ \ | |/ | | | | Patch written by Brice Berna.
| * Issue #11231: Fix bytes and bytearray docstringsVictor Stinner2011-12-171-7/+5
| | | | | | | | Patch written by Brice Berna.
* | Issue #13503: Use a more efficient reduction format for bytearrays withAntoine Pitrou2011-12-051-10/+42
| | | | | | | | | | | | | | pickle protocol >= 3. The old reduction format is kept with older protocols in order to allow unpickling under Python 2. Patch by Irmen de Jong.
* | Use the small object allocator for small bytearraysAntoine Pitrou2011-11-121-5/+5
| |