summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Expand the PySlice_GetIndicesEx macro. (#1023) (#1045)Serhiy Storchaka2017-04-081-3/+3
| | | (cherry picked from commit b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8)
* bpo-29116: Fix error messages for concatenating bytes and bytearray with ↵Serhiy Storchaka2017-03-191-1/+1
| | | | | unsupported type. (#709) (#724) (cherry picked from commit 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae)
* Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
| | | | form.
* Issue #25270: Prevent codecs.escape_encode() from raising SystemError when ↵Berker Peksag2016-09-161-5/+14
| | | | an empty bytestring is passed
* Issue #27473: Fixed possible integer overflow in bytes and bytearraySerhiy Storchaka2016-07-101-4/+2
| | | | concatenations. Patch by Xiang Zhang.
* Issue #27125: Remove duplicated words from documentation and commentsMartin Panter2016-05-301-1/+1
|
* Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
| | | | in places where Py_DECREF was used.
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+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 #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-2/+1
| | | | macro Py_SETREF.
* Issue #25766: Special method __bytes__() now works in str subclasses.Serhiy Storchaka2015-12-201-6/+12
|
* Issue #24731: Fixed crash on converting objects with special methodsSerhiy Storchaka2015-11-251-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 methodsSerhiy Storchaka2015-11-251-4/+4
| | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly.
* | Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()Serhiy Storchaka2015-07-201-3/+7
| | | | | | | | for single-byte argument on Linux.
* | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-11/+22
|\ \ | |/ | | | | | | 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-7/+13
| | | | | | | | | | 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.
* | Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.Gregory P. Smith2015-04-251-0/+16
| | | | | | | | | | | | | | 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-6/+9
| |
* | Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-506/+16
| |
* | Issue #23466: Raised OverflowError if %c argument is out of range.Serhiy Storchaka2015-04-031-3/+8
| |
* | Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError onSerhiy Storchaka2015-03-301-26/+55
| | | | | | | | non-integer input.
* | 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 #23681: The -b option now affects comparisons of bytes with int.Serhiy Storchaka2015-03-201-8/+17
| |
* | Close issue23467: add %r compatibility to bytes and bytearrayEthan Furman2015-03-111-0/+2
| |
* | Issue #23629: Fix the default __sizeof__ implementation for variable-sized ↵Antoine Pitrou2015-03-101-37/+0
|\ \ | |/ | | | | objects.
| * Issue #23629: Fix the default __sizeof__ implementation for variable-sized ↵Antoine Pitrou2015-03-101-14/+0
| | | | | | | | objects.
* | Issue #23450: Fixed possible integer overflows.Serhiy Storchaka2015-02-161-1/+1
| |
* | Issue #23383: Cleaned up bytes formatting.Serhiy Storchaka2015-02-101-140/+51
| |
* | Issue #22896: Fixed using _getbuffer() in recently added _PyBytes_Format().Serhiy Storchaka2015-02-021-3/+2
| |
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-116/+146
|\ \ | |/ | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-89/+82
| | | | | | | | and PyObject_AsWriteBuffer().
* | Issue #20284: Fix a compilation warning on WindowsVictor Stinner2015-01-261-1/+1
| | | | | | | | Explicitly cast the long to char.
* | ensure ilen is initialized when it is assigned to lenBenjamin Peterson2015-01-261-1/+1
| |
* | Issue20284: Implement PEP461Ethan Furman2015-01-241-7/+650
| |
* | Issue #20335: bytes constructor now raises TypeError when encoding or errorsSerhiy Storchaka2014-12-021-7/+7
|\ \ | |/ | | | | is specified with non-string argument. Based on patch by Renaud Blanch.
| * Issue #20335: bytes constructor now raises TypeError when encoding or errorsSerhiy Storchaka2014-12-021-7/+7
| | | | | | | | is specified with non-string argument. Based on patch by Renaud Blanch.
* | Issue #22615: Argument Clinic now supports the "type" argument for theLarry Hastings2014-10-131-1/+1
| | | | | | | | | | int converter. This permits using the int converter with enums and typedefs.
* | #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.)
* | merge 3.4Benjamin Peterson2014-09-291-1/+1
|\ \ | |/
| * merge 3.3Benjamin Peterson2014-09-291-1/+1
| |\
| | * these variables ought to be Py_ssize_tBenjamin Peterson2014-09-291-1/+1
| | |
* | | merge 3.4 (#22519)Benjamin Peterson2014-09-291-12/+16
|\ \ \ | |/ /
| * | merge 3.3 (closes #22519)Benjamin Peterson2014-09-291-12/+16
| |\ \ | | |/
| | * fix overflow checking in PyBytes_Repr (closes #22519)Benjamin Peterson2014-09-291-12/+16
| | |
* | | Removed redundant casts to `char *`.Serhiy Storchaka2014-09-281-1/+1
| | | | | | | | | | | | Corresponding functions now accept `const char *` (issue #1772673).
* | | Issue #22215: Now ValueError is raised instead of TypeError when str or bytesSerhiy Storchaka2014-09-061-2/+2
| | | | | | | | | | | | argument contains not permitted null character or byte.
* | | Issue #22207: Fix "comparison between signed and unsigned integers" warning inVictor Stinner2014-08-171-3/+4
| | | | | | | | | | | | | | | test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.