summaryrefslogtreecommitdiff
path: root/Modules/_io/bytesio.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+1
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. ↵Serhiy Storchaka2020-04-121-2/+2
| | | | (GH-19472)
* bpo-11410: Standardize and use symbol visibility attributes across POSIX and ↵Vinay Sajip2019-10-151-1/+1
| | | | Windows. (GH-16347)
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* bpo-34488: optimize BytesIO.writelines() (GH-8904)Sergey Fedoseev2019-08-071-36/+59
| | | Avoid the creation of unused int object for each line.
* Fix the error handling in bytesio_sizeof(). (GH-10459)Zackery Spytz2019-06-021-2/+7
| | | bytesio_sizeof() must check if an error has occurred in _PySys_GetSizeOf().
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-301-4/+4
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka2018-11-271-1/+1
| | | Fix also return type for few other functions (clear, releasebuffer).
* bpo-35081: Add Include/internal/pycore_object.h (GH-10640)Victor Stinner2018-11-211-0/+1
| | | | Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from Include/objimpl.h to Include/internal/pycore_object.h.
* bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. ↵Siddhesh Poyarekar2018-04-291-1/+1
| | | | | | | | | (GH-6030) METH_NOARGS functions need only a single argument but they are cast into a PyCFunction, which takes two arguments. This triggers an invalid function cast warning in gcc8 due to the argument mismatch. Fix this by adding a dummy unused argument.
* bpo-31095: fix potential crash during GC (GH-2974)INADA Naoki2017-08-241-0/+2
|
* bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716)Serhiy Storchaka2017-03-301-35/+9
| | | if pass `accept={int, NoneType}`.
* bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵Serhiy Storchaka2017-03-211-1/+1
| | | | (#748)
* bpo-29730: replace some calls to PyNumber_Check and improve some error ↵Oren Milman2017-03-131-1/+7
| | | | messages (#650)
* bpo-29741: Clean up C implementations of BytesIO and StringIO. (#606)orenmn2017-03-111-50/+23
| | | Some BytesIO methods now accept not just int subclasses but other int-like types.
* Issue #23214: Implement optional BufferedReader, BytesIO read1() argumentMartin Panter2016-10-201-3/+3
|
* Issue #20699: Merge io bytes-like fixes from 3.5Martin Panter2016-05-281-2/+2
|\
| * Issue #20699: Document that “io” methods accept bytes-like objectsMartin Panter2016-05-281-2/+2
| | | | | | | | | | | | | | | | This matches the usage of ZipFile and BufferedWriter. This still requires return values to be bytes() objects. Also document and test that the write() methods should only access their argument before they return.
* | Merge typo fixes from 3.5Martin Panter2016-04-161-2/+2
|\ \ | |/
| * Fix typos in code comments and documentationMartin Panter2016-04-161-2/+2
| |
* | 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-2/+2
|\ \ | |/
| * Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
| |
* | Issue #20440: Cleaning up the code by using Py_SETREF and Py_CLEAR.Serhiy Storchaka2015-12-271-4/+2
|/ | | | | Old code is correct, but with Py_SETREF and Py_CLEAR it can be cleaner. This patch doesn't fix bugs and hence there is no need to backport it.
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-2/+1
| | | | macro Py_SETREF.
* 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 #24989: Fixed buffer overread in BytesIO.readline() if a position isSerhiy Storchaka2015-09-041-1/+5
| | | | set beyond size. Based on patch by John Leitch.
* Issue #24001: Argument Clinic converters now use accept={type}Larry Hastings2015-05-041-2/+2
| | | | instead of types={'type'} to specify the types the converter accepts.
* Issue #20175: Converted the _io module to Argument Clinic.Serhiy Storchaka2015-04-161-181/+246
|
* Replaced "string" with "bytes object" in docstrings of binary I/O objects.Serhiy Storchaka2015-04-101-10/+10
|\
| * Replaced "string" with "bytes object" in docstrings of binary I/O objects.Serhiy Storchaka2015-04-101-10/+10
| |
* | Issue #14203: Remove obsolete support for view==NULL in bytesiobuf_getbuffer()Stefan Krah2015-02-031-10/+11
| | | | | | | | and array_buffer_getbuf().
* | Issue #15381: Fixed a bug in BytesIO.write().Serhiy Storchaka2015-02-031-9/+10
| | | | | | | | | | | | It was expected that string_size == PyBytes_GET_SIZE(buf) if the buffer is shared, but truncate() and __setstate__() can set string_size without unsharing the buffer.
* | Issue #15381: Try to fix refcount bug. Empty and 1-byte buffers are always ↵Serhiy Storchaka2015-02-031-1/+3
| | | | | | | | shared.
* | Issue #15381: Optimized io.BytesIO to make less allocations and copyings.Serhiy Storchaka2015-02-031-186/+152
| |
* | Issue #23099: Closing io.BytesIO with exported buffer is rejected now toSerhiy Storchaka2015-02-031-0/+1
|\ \ | |/ | | | | prevent corrupting exported buffer.
| * Issue #23099: Closing io.BytesIO with exported buffer is rejected now toSerhiy Storchaka2015-02-031-0/+1
| | | | | | | | prevent corrupting exported buffer.
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-031-4/+6
|\ \ | |/ | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-031-4/+6
| | | | | | | | and PyObject_AsWriteBuffer().
* | Issue #22156: Fix some "comparison between signed and unsigned integers"Victor Stinner2014-08-161-2/+4
| | | | | | | | compiler warnings in the Modules/ subdirectory.
* | Issue #15381: Optimized line reading in io.BytesIO.Serhiy Storchaka2014-08-141-29/+27
| |
* | Issue #22003: When initialized from a bytes object, io.BytesIO() nowAntoine Pitrou2014-07-291-51/+151
|/ | | | | | | defers making a copy until it is mutated, improving performance and memory use on some use cases. Patch by David Wilson.
* Merge 3.2.Stefan Krah2012-09-081-1/+3
|\
| * Issue #15868: Fix refleak in bytesio.c (Coverity #715365).Stefan Krah2012-09-081-1/+3
| |
* | Issue #15841: The readable(), writable() and seekable() methods of BytesIOAntoine Pitrou2012-09-051-5/+15
|\ \ | |/ | | | | | | and StringIO objects now raise ValueError when the object has been closed. Patch by Alessandro Moura.
| * Issue #15841: The readable(), writable() and seekable() methods of BytesIOAntoine Pitrou2012-09-051-5/+15
| | | | | | | | | | and StringIO objects now raise ValueError when the object has been closed. Patch by Alessandro Moura.
* | Issue #15489: Add a __sizeof__ implementation for BytesIO objects.Antoine Pitrou2012-07-301-0/+12
|\ \ | |/ | | | | Patch by Serhiy Storchaka.
| * Issue #15489: Add a __sizeof__ implementation for BytesIO objects.Antoine Pitrou2012-07-301-0/+12
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #8914: fix various warnings from the Clang static analyzer v254.Brett Cannon2011-02-221-2/+0
|/
* correct logic when pos is after the string #10467Benjamin Peterson2010-11-201-3/+8
|