summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34879: Fix a possible null pointer dereference in bytesobject.c (GH-9683)Miss Islington (bot)2018-10-031-1/+1
| | | | | | | | formatfloat() was not checking if PyBytes_FromStringAndSize() failed, which could lead to a null pointer dereference in _PyBytes_FormatEx(). (cherry picked from commit 96c593279400693226d5a560c420ae0fcf1731b9) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-34436: Fix check that disables overallocation for the last fmt specifier ↵Miss Islington (bot)2018-08-231-3/+3
| | | | | | | | (GH-8826) Reported by Svace static analyzer. (cherry picked from commit ccd99752675042bd5f67d332c5b0ed85ba1f2da3) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
* [3.6] bpo-20047: Make bytearray methods partition() and rpartition() ↵Serhiy Storchaka2017-10-291-2/+2
| | | | | | rejecting (GH-4158) (#4162) separators that are not bytes-like objects.. (cherry picked from commit a2314283ff87c65e1745a42c2f2b716b1a209128)
* bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (GH-4058) (#4059)Miss Islington (bot)2017-10-201-1/+1
| | | | and in codecs.escape_decode() when decode an escaped non-ascii byte. (cherry picked from commit 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f)
* Expand the PySlice_GetIndicesEx macro. (#1023) (#1044)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) (#723) (cherry picked from commit 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae)
* bpo-28856: Let %b format for bytes support objects that follow the buffer ↵Xiang Zhang2017-03-141-1/+14
| | | | protocol (GH-664)
* [3.6] bpo-29714: Fix a regression that bytes format may fail when containing ↵Xiang Zhang2017-03-061-2/+2
| | | | | | zero bytes inside. (GH-504)
* Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception.INADA Naoki2017-01-061-8/+12
|
* Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
|\ | | | | | | form.
| * Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
| | | | | | | | form.
* | Issue 28128: Print out better error/warning messages for invalid string ↵Eric V. Smith2016-10-311-4/+33
| | | | | | | | escapes. Backport to 3.6.
* | Issue #25270: Merge from 3.5Berker Peksag2016-09-161-5/+14
|\ \ | |/
| * Issue #25270: Prevent codecs.escape_encode() from raising SystemError when ↵Berker Peksag2016-09-161-5/+14
| | | | | | | | an empty bytestring is passed
* | Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly ↵Christian Heimes2016-09-131-10/+10
| | | | | | | | optimize memcpy().
* | remove all usage of Py_LOCALBenjamin Peterson2016-09-091-1/+1
| |
* | #27364: Deprecate invalid escape strings in str/byutes.R David Murray2016-09-081-1/+2
| | | | | | | | Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-2/+2
| |
* | Issue #27506: Support bytes/bytearray.translate() delete as keyword argumentMartin Panter2016-08-271-6/+4
| | | | | | | | 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 #27473: Fixed possible integer overflow in bytes and bytearraySerhiy Storchaka2016-07-101-4/+2
|\ \ | |/ | | | | concatenations. Patch by Xiang Zhang.
| * Issue #27473: Fixed possible integer overflow in bytes and bytearraySerhiy Storchaka2016-07-101-4/+2
| | | | | | | | concatenations. Patch by Xiang Zhang.
* | Issue #27460: Unified error messages in bytes constructor for integersSerhiy Storchaka2016-07-061-2/+2
| | | | | | | | in and out of the Py_ssize_t range. Patch by Xiang Zhang.
* | Backed out changeset b0087e17cd5e (issue #26765)Serhiy Storchaka2016-07-031-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 headerSerhiy Storchaka2016-07-011-71/+11
| | | | | | | | file.
* | Issue #27007: The fromhex() class methods of bytes and bytearray subclassesSerhiy Storchaka2016-07-011-1/+6
| | | | | | | | now return an instance of corresponding subclass.
* | Issue #27125: Merge typo fixes from 3.5Martin Panter2016-05-301-1/+1
|\ \ | |/
| * Issue #27125: Remove duplicated words from documentation and commentsMartin Panter2016-05-301-1/+1
| |
* | Issue #26765: Moved common code for the replace() method of bytes and bytearraySerhiy Storchaka2016-05-051-505/+3
| | | | | | | | to a template file.
* | Issue #26765: Moved common code and docstrings for bytes and bytearray methodsSerhiy Storchaka2016-05-041-336/+26
| | | | | | | | to bytes_methods.c.
* | Got rid of redundand "self" parameter declarations.Serhiy Storchaka2016-05-021-26/+20
| | | | | | | | Argument Clinic is now able to infer all needed information.
* | Issue #25349, #26249: Fix memleak in formatfloat()Victor Stinner2016-04-261-0/+1
| |
* | Issue #26766: Fix _PyBytesWriter_Finish()Victor Stinner2016-04-151-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 Storchaka2016-04-151-6/+4
| |
* | 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 #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
| | | | | | | | in places where Py_DECREF was used.
* | Issue #17339: Improved TypeError message in bytes constructor.Serhiy Storchaka2016-04-101-16/+15
| |
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|\ \ | |/
| * 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 #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.
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
| | | | | | | | private functions.
* | Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-2/+1
|\ \ | |/ | | | | macro Py_SETREF.
| * 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 #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 #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.