diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-30 06:15:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-30 06:15:31 (GMT) |
commit | 762bf40438a572a398e500c74e38f9894ea20a45 (patch) | |
tree | e3cec204dd4f633631650bf10222344a2c605929 /Modules/_io/fileio.c | |
parent | ea720fe7e99d68924deab38de955fe97f87e2b29 (diff) | |
download | cpython-762bf40438a572a398e500c74e38f9894ea20a45.zip cpython-762bf40438a572a398e500c74e38f9894ea20a45.tar.gz cpython-762bf40438a572a398e500c74e38f9894ea20a45.tar.bz2 |
bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716)
if pass `accept={int, NoneType}`.
Diffstat (limited to 'Modules/_io/fileio.c')
-rw-r--r-- | Modules/_io/fileio.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 6000508..3c0b752 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -52,13 +52,6 @@ class _io.FileIO "fileio *" "&PyFileIO_Type" [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=1c77708b41fda70c]*/ -/*[python input] -class io_ssize_t_converter(CConverter): - type = 'Py_ssize_t' - converter = '_PyIO_ConvertSsize_t' -[python start generated code]*/ -/*[python end generated code: output=da39a3ee5e6b4b0d input=d0a811d3cbfd1b33]*/ - typedef struct { PyObject_HEAD int fd; @@ -770,7 +763,7 @@ _io_FileIO_readall_impl(fileio *self) /*[clinic input] _io.FileIO.read - size: io_ssize_t = -1 + size: Py_ssize_t(accept={int, NoneType}) = -1 / Read at most size bytes, returned as bytes. @@ -782,7 +775,7 @@ Return an empty bytes object at EOF. static PyObject * _io_FileIO_read_impl(fileio *self, Py_ssize_t size) -/*[clinic end generated code: output=42528d39dd0ca641 input=5c6caa5490c13a9b]*/ +/*[clinic end generated code: output=42528d39dd0ca641 input=bec9a2c704ddcbc9]*/ { char *ptr; Py_ssize_t n; |