summaryrefslogtreecommitdiffstats
path: root/Modules/_io/bytesio.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-121-1/+7
| | | | messages (#650)
* bpo-29741: Clean up C implementations of BytesIO and StringIO. (#606)orenmn2017-03-101-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-091-10/+10
|\
| * Replaced "string" with "bytes object" in docstrings of binary I/O objects.Serhiy Storchaka2015-04-091-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-021-4/+6
|\ \ | |/ | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-4/+6
| | | | | | | | and PyObject_AsWriteBuffer().
* | Issue #22156: Fix some "comparison between signed and unsigned integers"Victor Stinner2014-08-151-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-291-0/+12
|\ \ | |/ | | | | Patch by Serhiy Storchaka.
| * Issue #15489: Add a __sizeof__ implementation for BytesIO objects.Antoine Pitrou2012-07-291-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
|
* Issue #5506: BytesIO objects now have a getbuffer() method exporting aAntoine Pitrou2010-09-061-0/+141
| | | | | view of their contents without duplicating them. The view is both readable and writable.
* BytesIO.getvalue() and StringIO.getvalue() are METH_NOARGS.Antoine Pitrou2010-09-021-1/+1
|
* Merged revisions 80720 via svnmerge fromAntoine Pitrou2010-05-031-0/+1
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines Issue #7865: The close() method of :mod:`io` objects should not swallow exceptions raised by the implicit flush(). Also ensure that calling close() several times is supported. Patch by Pascal Chambon. ........
* Merged revisions 77890 via svnmerge fromAntoine Pitrou2010-01-311-2/+1
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77890 | antoine.pitrou | 2010-01-31 23:26:04 +0100 (dim., 31 janv. 2010) | 7 lines - Issue #6939: Fix file I/O objects in the `io` module to keep the original file position when calling `truncate()`. It would previously change the file position to the given argument, which goes against the tradition of ftruncate() and other truncation APIs. Patch by Pascal Chambon. ........
* Issue 5449: Fix io.BytesIO to not accept arbitrary keywordsAlexandre Vassalotti2009-08-041-1/+3
| | | | Patch contributed by Erick Tryzelaar.
* Issue #6218: Make io.BytesIO and io.StringIO picklable.Alexandre Vassalotti2009-07-221-3/+119
|
* Issue #6242: Fix deallocator of io.StringIO and io.BytesIO.Alexandre Vassalotti2009-07-221-4/+4
|
* move to a naming scheme with all lowercase and underscoresBenjamin Peterson2009-06-121-30/+30
|
* use NULL for the ends of tablesBenjamin Peterson2009-04-191-1/+1
|