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/textio.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/textio.c')
-rw-r--r-- | Modules/_io/textio.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 0211ad9..5639ad8 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -18,13 +18,6 @@ class _io.TextIOWrapper "textio *" "&TextIOWrapper_TYpe" [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=2097a4fc85670c26]*/ -/*[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]*/ - _Py_IDENTIFIER(close); _Py_IDENTIFIER(_dealloc_warn); _Py_IDENTIFIER(decode); @@ -1529,13 +1522,13 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint) /*[clinic input] _io.TextIOWrapper.read - size as n: io_ssize_t = -1 + size as n: Py_ssize_t(accept={int, NoneType}) = -1 / [clinic start generated code]*/ static PyObject * _io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n) -/*[clinic end generated code: output=7e651ce6cc6a25a6 input=8c09398424085cca]*/ +/*[clinic end generated code: output=7e651ce6cc6a25a6 input=123eecbfe214aeb8]*/ { PyObject *result = NULL, *chunks = NULL; |