diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-12 08:10:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-12 08:10:47 (GMT) |
commit | 202fda55c2dffe27125703225e5af92254602dc6 (patch) | |
tree | afc430d7fa6bdda7251bb60703ff192b9c8a37e1 /Modules/_io | |
parent | 0767ad40bfe83525d2ba290cc6eb7c97ce01cdd6 (diff) | |
download | cpython-202fda55c2dffe27125703225e5af92254602dc6.zip cpython-202fda55c2dffe27125703225e5af92254602dc6.tar.gz cpython-202fda55c2dffe27125703225e5af92254602dc6.tar.bz2 |
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485)
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/_iomodule.c | 4 | ||||
-rw-r--r-- | Modules/_io/fileio.c | 4 | ||||
-rw-r--r-- | Modules/_io/textio.c | 10 | ||||
-rw-r--r-- | Modules/_io/winconsoleio.c | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index f4d3cbd..8f0b72a 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -105,7 +105,7 @@ _io.open encoding: str(accept={str, NoneType}) = NULL errors: str(accept={str, NoneType}) = NULL newline: str(accept={str, NoneType}) = NULL - closefd: int(c_default="1") = True + closefd: bool(accept={int}) = True opener: object = None Open file and return a stream. Raise IOError upon failure. @@ -232,7 +232,7 @@ static PyObject * _io_open_impl(PyObject *module, PyObject *file, const char *mode, int buffering, const char *encoding, const char *errors, const char *newline, int closefd, PyObject *opener) -/*[clinic end generated code: output=aefafc4ce2b46dc0 input=f4e1ca75223987bc]*/ +/*[clinic end generated code: output=aefafc4ce2b46dc0 input=7f81b2a1d3b02344]*/ { unsigned i; diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 67d5e3e..b99506f 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -207,7 +207,7 @@ extern int _Py_open_cloexec_works; _io.FileIO.__init__ file as nameobj: object mode: str = "r" - closefd: int(c_default="1") = True + closefd: bool(accept={int}) = True opener: object = None Open a file. @@ -228,7 +228,7 @@ results in functionality similar to passing None). static int _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode, int closefd, PyObject *opener) -/*[clinic end generated code: output=23413f68e6484bbd input=193164e293d6c097]*/ +/*[clinic end generated code: output=23413f68e6484bbd input=1596c9157a042a39]*/ { #ifdef MS_WINDOWS Py_UNICODE *widename = NULL; diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 1d32d53..4133bf3 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -511,13 +511,13 @@ _PyIncrementalNewlineDecoder_decode(PyObject *myself, /*[clinic input] _io.IncrementalNewlineDecoder.decode input: object - final: int(c_default="0") = False + final: bool(accept={int}) = False [clinic start generated code]*/ static PyObject * _io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self, PyObject *input, int final) -/*[clinic end generated code: output=0d486755bb37a66e input=d65677385bfd6827]*/ +/*[clinic end generated code: output=0d486755bb37a66e input=a4ea97f26372d866]*/ { return _PyIncrementalNewlineDecoder_decode((PyObject *) self, input, final); } @@ -792,8 +792,8 @@ _io.TextIOWrapper.__init__ encoding: str(accept={str, NoneType}) = NULL errors: str(accept={str, NoneType}) = NULL newline: str(accept={str, NoneType}) = NULL - line_buffering: int(c_default="0") = False - write_through: int(c_default="0") = False + line_buffering: bool(accept={int}) = False + write_through: bool(accept={int}) = False Character and line based layer over a BufferedIOBase object, buffer. @@ -830,7 +830,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, const char *encoding, const char *errors, const char *newline, int line_buffering, int write_through) -/*[clinic end generated code: output=56a83402ce2a8381 input=3126cb3101a2c99b]*/ +/*[clinic end generated code: output=56a83402ce2a8381 input=598d10cc5f2ed7dd]*/ { PyObject *raw, *codec_info = NULL; _PyIO_State *state = NULL; diff --git a/Modules/_io/winconsoleio.c b/Modules/_io/winconsoleio.c index 4d36bb5..4251c20 100644 --- a/Modules/_io/winconsoleio.c +++ b/Modules/_io/winconsoleio.c @@ -252,7 +252,7 @@ winconsoleio_new(PyTypeObject *type, PyObject *args, PyObject *kwds) _io._WindowsConsoleIO.__init__ file as nameobj: object mode: str = "r" - closefd: int(c_default="1") = True + closefd: bool(accept={int}) = True opener: object = None Open a console buffer by file descriptor. @@ -266,7 +266,7 @@ static int _io__WindowsConsoleIO___init___impl(winconsoleio *self, PyObject *nameobj, const char *mode, int closefd, PyObject *opener) -/*[clinic end generated code: output=3fd9cbcdd8d95429 input=61be39633a86f5d7]*/ +/*[clinic end generated code: output=3fd9cbcdd8d95429 input=06ae4b863c63244b]*/ { const char *s; wchar_t *name = NULL; |