mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-111178: Generate correct signature for most self converters (#128447)
This commit is contained in:
parent
4d0a6595a0
commit
537296cdcd
74 changed files with 1627 additions and 1631 deletions
|
@ -588,7 +588,7 @@ _io_BytesIO_readinto_impl(bytesio *self, Py_buffer *buffer)
|
|||
|
||||
/*[clinic input]
|
||||
_io.BytesIO.truncate
|
||||
size: Py_ssize_t(accept={int, NoneType}, c_default="self->pos") = None
|
||||
size: Py_ssize_t(accept={int, NoneType}, c_default="((bytesio *)self)->pos") = None
|
||||
/
|
||||
|
||||
Truncate the file to at most size bytes.
|
||||
|
@ -599,7 +599,7 @@ The current file position is unchanged. Returns the new size.
|
|||
|
||||
static PyObject *
|
||||
_io_BytesIO_truncate_impl(bytesio *self, Py_ssize_t size)
|
||||
/*[clinic end generated code: output=9ad17650c15fa09b input=423759dd42d2f7c1]*/
|
||||
/*[clinic end generated code: output=9ad17650c15fa09b input=dae4295e11c1bbb4]*/
|
||||
{
|
||||
CHECK_CLOSED(self);
|
||||
CHECK_EXPORTS(self);
|
||||
|
|
94
Modules/_io/clinic/bufferedio.c.h
generated
94
Modules/_io/clinic/bufferedio.c.h
generated
|
@ -288,12 +288,12 @@ static PyObject *
|
|||
_io__Buffered___sizeof___impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered___sizeof__(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered___sizeof__(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered___sizeof___impl(self);
|
||||
return_value = _io__Buffered___sizeof___impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -319,12 +319,12 @@ static PyObject *
|
|||
_io__Buffered_simple_flush_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_simple_flush(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_simple_flush(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_simple_flush_impl(self);
|
||||
return_value = _io__Buffered_simple_flush_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -344,12 +344,12 @@ static PyObject *
|
|||
_io__Buffered_closed_get_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_closed_get(buffered *self, void *Py_UNUSED(context))
|
||||
_io__Buffered_closed_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_closed_get_impl(self);
|
||||
return_value = _io__Buffered_closed_get_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -367,12 +367,12 @@ static PyObject *
|
|||
_io__Buffered_close_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_close(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_close(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_close_impl(self);
|
||||
return_value = _io__Buffered_close_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -390,12 +390,12 @@ static PyObject *
|
|||
_io__Buffered_detach_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_detach(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_detach(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_detach_impl(self);
|
||||
return_value = _io__Buffered_detach_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -413,12 +413,12 @@ static PyObject *
|
|||
_io__Buffered_seekable_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_seekable(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_seekable_impl(self);
|
||||
return_value = _io__Buffered_seekable_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -436,12 +436,12 @@ static PyObject *
|
|||
_io__Buffered_readable_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_readable(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_readable_impl(self);
|
||||
return_value = _io__Buffered_readable_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -459,12 +459,12 @@ static PyObject *
|
|||
_io__Buffered_writable_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_writable(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_writable_impl(self);
|
||||
return_value = _io__Buffered_writable_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -484,12 +484,12 @@ static PyObject *
|
|||
_io__Buffered_name_get_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_name_get(buffered *self, void *Py_UNUSED(context))
|
||||
_io__Buffered_name_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_name_get_impl(self);
|
||||
return_value = _io__Buffered_name_get_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -509,12 +509,12 @@ static PyObject *
|
|||
_io__Buffered_mode_get_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_mode_get(buffered *self, void *Py_UNUSED(context))
|
||||
_io__Buffered_mode_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_mode_get_impl(self);
|
||||
return_value = _io__Buffered_mode_get_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -532,12 +532,12 @@ static PyObject *
|
|||
_io__Buffered_fileno_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_fileno(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_fileno(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_fileno_impl(self);
|
||||
return_value = _io__Buffered_fileno_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -555,12 +555,12 @@ static PyObject *
|
|||
_io__Buffered_isatty_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_isatty_impl(self);
|
||||
return_value = _io__Buffered_isatty_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -578,12 +578,12 @@ static PyObject *
|
|||
_io__Buffered_flush_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_flush(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_flush(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_flush_impl(self);
|
||||
return_value = _io__Buffered_flush_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -601,7 +601,7 @@ static PyObject *
|
|||
_io__Buffered_peek_impl(buffered *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_peek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io__Buffered_peek(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = 0;
|
||||
|
@ -626,7 +626,7 @@ _io__Buffered_peek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_peek_impl(self, size);
|
||||
return_value = _io__Buffered_peek_impl((buffered *)self, size);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -645,7 +645,7 @@ static PyObject *
|
|||
_io__Buffered_read_impl(buffered *self, Py_ssize_t n);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_read(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io__Buffered_read(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
@ -661,7 +661,7 @@ _io__Buffered_read(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_read_impl(self, n);
|
||||
return_value = _io__Buffered_read_impl((buffered *)self, n);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -680,7 +680,7 @@ static PyObject *
|
|||
_io__Buffered_read1_impl(buffered *self, Py_ssize_t n);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_read1(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io__Buffered_read1(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
@ -705,7 +705,7 @@ _io__Buffered_read1(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_read1_impl(self, n);
|
||||
return_value = _io__Buffered_read1_impl((buffered *)self, n);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -724,7 +724,7 @@ static PyObject *
|
|||
_io__Buffered_readinto_impl(buffered *self, Py_buffer *buffer);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_readinto(buffered *self, PyObject *arg)
|
||||
_io__Buffered_readinto(PyObject *self, PyObject *arg)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
@ -734,7 +734,7 @@ _io__Buffered_readinto(buffered *self, PyObject *arg)
|
|||
goto exit;
|
||||
}
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_readinto_impl(self, &buffer);
|
||||
return_value = _io__Buffered_readinto_impl((buffered *)self, &buffer);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -758,7 +758,7 @@ static PyObject *
|
|||
_io__Buffered_readinto1_impl(buffered *self, Py_buffer *buffer);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_readinto1(buffered *self, PyObject *arg)
|
||||
_io__Buffered_readinto1(PyObject *self, PyObject *arg)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
@ -768,7 +768,7 @@ _io__Buffered_readinto1(buffered *self, PyObject *arg)
|
|||
goto exit;
|
||||
}
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_readinto1_impl(self, &buffer);
|
||||
return_value = _io__Buffered_readinto1_impl((buffered *)self, &buffer);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -792,7 +792,7 @@ static PyObject *
|
|||
_io__Buffered_readline_impl(buffered *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_readline(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io__Buffered_readline(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -808,7 +808,7 @@ _io__Buffered_readline(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_readline_impl(self, size);
|
||||
return_value = _io__Buffered_readline_impl((buffered *)self, size);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -827,12 +827,12 @@ static PyObject *
|
|||
_io__Buffered_tell_impl(buffered *self);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_tell(buffered *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__Buffered_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_tell_impl(self);
|
||||
return_value = _io__Buffered_tell_impl((buffered *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -850,7 +850,7 @@ static PyObject *
|
|||
_io__Buffered_seek_impl(buffered *self, PyObject *targetobj, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_seek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io__Buffered_seek(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *targetobj;
|
||||
|
@ -869,7 +869,7 @@ _io__Buffered_seek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_seek_impl(self, targetobj, whence);
|
||||
return_value = _io__Buffered_seek_impl((buffered *)self, targetobj, whence);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -888,7 +888,7 @@ static PyObject *
|
|||
_io__Buffered_truncate_impl(buffered *self, PyTypeObject *cls, PyObject *pos);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_truncate(buffered *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__Buffered_truncate(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -918,7 +918,7 @@ _io__Buffered_truncate(buffered *self, PyTypeObject *cls, PyObject *const *args,
|
|||
pos = args[0];
|
||||
skip_optional_posonly:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io__Buffered_truncate_impl(self, cls, pos);
|
||||
return_value = _io__Buffered_truncate_impl((buffered *)self, cls, pos);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -1089,7 +1089,7 @@ static PyObject *
|
|||
_io_BufferedWriter_write_impl(buffered *self, Py_buffer *buffer);
|
||||
|
||||
static PyObject *
|
||||
_io_BufferedWriter_write(buffered *self, PyObject *arg)
|
||||
_io_BufferedWriter_write(PyObject *self, PyObject *arg)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
@ -1098,7 +1098,7 @@ _io_BufferedWriter_write(buffered *self, PyObject *arg)
|
|||
goto exit;
|
||||
}
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_BufferedWriter_write_impl(self, &buffer);
|
||||
return_value = _io_BufferedWriter_write_impl((buffered *)self, &buffer);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -1246,4 +1246,4 @@ skip_optional_pos:
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=8f28a97987a9fbe1 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=f019d29701ba2556 input=a9049054013a1b77]*/
|
||||
|
|
68
Modules/_io/clinic/bytesio.c.h
generated
68
Modules/_io/clinic/bytesio.c.h
generated
|
@ -22,9 +22,9 @@ static PyObject *
|
|||
_io_BytesIO_readable_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_readable(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_readable_impl(self);
|
||||
return _io_BytesIO_readable_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_writable__doc__,
|
||||
|
@ -40,9 +40,9 @@ static PyObject *
|
|||
_io_BytesIO_writable_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_writable(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_writable_impl(self);
|
||||
return _io_BytesIO_writable_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_seekable__doc__,
|
||||
|
@ -58,9 +58,9 @@ static PyObject *
|
|||
_io_BytesIO_seekable_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_seekable(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_seekable_impl(self);
|
||||
return _io_BytesIO_seekable_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_flush__doc__,
|
||||
|
@ -76,9 +76,9 @@ static PyObject *
|
|||
_io_BytesIO_flush_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_flush(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_flush(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_flush_impl(self);
|
||||
return _io_BytesIO_flush_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_getbuffer__doc__,
|
||||
|
@ -94,13 +94,13 @@ static PyObject *
|
|||
_io_BytesIO_getbuffer_impl(bytesio *self, PyTypeObject *cls);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_getbuffer(bytesio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_BytesIO_getbuffer(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
|
||||
PyErr_SetString(PyExc_TypeError, "getbuffer() takes no arguments");
|
||||
return NULL;
|
||||
}
|
||||
return _io_BytesIO_getbuffer_impl(self, cls);
|
||||
return _io_BytesIO_getbuffer_impl((bytesio *)self, cls);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_getvalue__doc__,
|
||||
|
@ -116,9 +116,9 @@ static PyObject *
|
|||
_io_BytesIO_getvalue_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_getvalue(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_getvalue(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_getvalue_impl(self);
|
||||
return _io_BytesIO_getvalue_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_isatty__doc__,
|
||||
|
@ -136,9 +136,9 @@ static PyObject *
|
|||
_io_BytesIO_isatty_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_isatty(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_isatty_impl(self);
|
||||
return _io_BytesIO_isatty_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_tell__doc__,
|
||||
|
@ -154,9 +154,9 @@ static PyObject *
|
|||
_io_BytesIO_tell_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_tell(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_tell_impl(self);
|
||||
return _io_BytesIO_tell_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO_read__doc__,
|
||||
|
@ -175,7 +175,7 @@ static PyObject *
|
|||
_io_BytesIO_read_impl(bytesio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_read(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_BytesIO_read(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -190,7 +190,7 @@ _io_BytesIO_read(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
goto exit;
|
||||
}
|
||||
skip_optional:
|
||||
return_value = _io_BytesIO_read_impl(self, size);
|
||||
return_value = _io_BytesIO_read_impl((bytesio *)self, size);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -212,7 +212,7 @@ static PyObject *
|
|||
_io_BytesIO_read1_impl(bytesio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_read1(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_BytesIO_read1(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -227,7 +227,7 @@ _io_BytesIO_read1(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
goto exit;
|
||||
}
|
||||
skip_optional:
|
||||
return_value = _io_BytesIO_read1_impl(self, size);
|
||||
return_value = _io_BytesIO_read1_impl((bytesio *)self, size);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -250,7 +250,7 @@ static PyObject *
|
|||
_io_BytesIO_readline_impl(bytesio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_readline(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_BytesIO_readline(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -265,7 +265,7 @@ _io_BytesIO_readline(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
goto exit;
|
||||
}
|
||||
skip_optional:
|
||||
return_value = _io_BytesIO_readline_impl(self, size);
|
||||
return_value = _io_BytesIO_readline_impl((bytesio *)self, size);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -288,7 +288,7 @@ static PyObject *
|
|||
_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_readlines(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_BytesIO_readlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *arg = Py_None;
|
||||
|
@ -301,7 +301,7 @@ _io_BytesIO_readlines(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
arg = args[0];
|
||||
skip_optional:
|
||||
return_value = _io_BytesIO_readlines_impl(self, arg);
|
||||
return_value = _io_BytesIO_readlines_impl((bytesio *)self, arg);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -323,7 +323,7 @@ static PyObject *
|
|||
_io_BytesIO_readinto_impl(bytesio *self, Py_buffer *buffer);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_readinto(bytesio *self, PyObject *arg)
|
||||
_io_BytesIO_readinto(PyObject *self, PyObject *arg)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
@ -332,7 +332,7 @@ _io_BytesIO_readinto(bytesio *self, PyObject *arg)
|
|||
_PyArg_BadArgument("readinto", "argument", "read-write bytes-like object", arg);
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_BytesIO_readinto_impl(self, &buffer);
|
||||
return_value = _io_BytesIO_readinto_impl((bytesio *)self, &buffer);
|
||||
|
||||
exit:
|
||||
/* Cleanup for buffer */
|
||||
|
@ -359,10 +359,10 @@ static PyObject *
|
|||
_io_BytesIO_truncate_impl(bytesio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_truncate(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_BytesIO_truncate(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = self->pos;
|
||||
Py_ssize_t size = ((bytesio *)self)->pos;
|
||||
|
||||
if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
|
||||
goto exit;
|
||||
|
@ -374,7 +374,7 @@ _io_BytesIO_truncate(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
goto exit;
|
||||
}
|
||||
skip_optional:
|
||||
return_value = _io_BytesIO_truncate_impl(self, size);
|
||||
return_value = _io_BytesIO_truncate_impl((bytesio *)self, size);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -399,7 +399,7 @@ static PyObject *
|
|||
_io_BytesIO_seek_impl(bytesio *self, Py_ssize_t pos, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_seek(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_BytesIO_seek(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t pos;
|
||||
|
@ -428,7 +428,7 @@ _io_BytesIO_seek(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
goto exit;
|
||||
}
|
||||
skip_optional:
|
||||
return_value = _io_BytesIO_seek_impl(self, pos, whence);
|
||||
return_value = _io_BytesIO_seek_impl((bytesio *)self, pos, whence);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -471,9 +471,9 @@ static PyObject *
|
|||
_io_BytesIO_close_impl(bytesio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_close(bytesio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_BytesIO_close(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_BytesIO_close_impl(self);
|
||||
return _io_BytesIO_close_impl((bytesio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_BytesIO___init____doc__,
|
||||
|
@ -535,4 +535,4 @@ skip_optional_pos:
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=985ff54e89f6036e input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=8a5e153bc7584b55 input=a9049054013a1b77]*/
|
||||
|
|
54
Modules/_io/clinic/fileio.c.h
generated
54
Modules/_io/clinic/fileio.c.h
generated
|
@ -25,13 +25,13 @@ static PyObject *
|
|||
_io_FileIO_close_impl(fileio *self, PyTypeObject *cls);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_close(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_close(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
|
||||
PyErr_SetString(PyExc_TypeError, "close() takes no arguments");
|
||||
return NULL;
|
||||
}
|
||||
return _io_FileIO_close_impl(self, cls);
|
||||
return _io_FileIO_close_impl((fileio *)self, cls);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_FileIO___init____doc__,
|
||||
|
@ -151,9 +151,9 @@ static PyObject *
|
|||
_io_FileIO_fileno_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_fileno(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_fileno(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_fileno_impl(self);
|
||||
return _io_FileIO_fileno_impl((fileio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_FileIO_readable__doc__,
|
||||
|
@ -169,9 +169,9 @@ static PyObject *
|
|||
_io_FileIO_readable_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_readable(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_readable_impl(self);
|
||||
return _io_FileIO_readable_impl((fileio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_FileIO_writable__doc__,
|
||||
|
@ -187,9 +187,9 @@ static PyObject *
|
|||
_io_FileIO_writable_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_writable(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_writable_impl(self);
|
||||
return _io_FileIO_writable_impl((fileio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_FileIO_seekable__doc__,
|
||||
|
@ -205,9 +205,9 @@ static PyObject *
|
|||
_io_FileIO_seekable_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_seekable(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_seekable_impl(self);
|
||||
return _io_FileIO_seekable_impl((fileio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_FileIO_readinto__doc__,
|
||||
|
@ -223,7 +223,7 @@ static PyObject *
|
|||
_io_FileIO_readinto_impl(fileio *self, PyTypeObject *cls, Py_buffer *buffer);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_readinto(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_readinto(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -251,7 +251,7 @@ _io_FileIO_readinto(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s
|
|||
_PyArg_BadArgument("readinto", "argument 1", "read-write bytes-like object", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_FileIO_readinto_impl(self, cls, &buffer);
|
||||
return_value = _io_FileIO_readinto_impl((fileio *)self, cls, &buffer);
|
||||
|
||||
exit:
|
||||
/* Cleanup for buffer */
|
||||
|
@ -278,9 +278,9 @@ static PyObject *
|
|||
_io_FileIO_readall_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_readall(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_readall_impl(self);
|
||||
return _io_FileIO_readall_impl((fileio *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_FileIO_read__doc__,
|
||||
|
@ -300,7 +300,7 @@ static PyObject *
|
|||
_io_FileIO_read_impl(fileio *self, PyTypeObject *cls, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_read(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_read(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -331,7 +331,7 @@ _io_FileIO_read(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize
|
|||
goto exit;
|
||||
}
|
||||
skip_optional_posonly:
|
||||
return_value = _io_FileIO_read_impl(self, cls, size);
|
||||
return_value = _io_FileIO_read_impl((fileio *)self, cls, size);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -354,7 +354,7 @@ static PyObject *
|
|||
_io_FileIO_write_impl(fileio *self, PyTypeObject *cls, Py_buffer *b);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_write(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_write(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -381,7 +381,7 @@ _io_FileIO_write(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssiz
|
|||
if (PyObject_GetBuffer(args[0], &b, PyBUF_SIMPLE) != 0) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_FileIO_write_impl(self, cls, &b);
|
||||
return_value = _io_FileIO_write_impl((fileio *)self, cls, &b);
|
||||
|
||||
exit:
|
||||
/* Cleanup for b */
|
||||
|
@ -413,7 +413,7 @@ static PyObject *
|
|||
_io_FileIO_seek_impl(fileio *self, PyObject *pos, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_seek(fileio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_FileIO_seek(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *pos;
|
||||
|
@ -431,7 +431,7 @@ _io_FileIO_seek(fileio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
goto exit;
|
||||
}
|
||||
skip_optional:
|
||||
return_value = _io_FileIO_seek_impl(self, pos, whence);
|
||||
return_value = _io_FileIO_seek_impl((fileio *)self, pos, whence);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -452,9 +452,9 @@ static PyObject *
|
|||
_io_FileIO_tell_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_tell(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_tell_impl(self);
|
||||
return _io_FileIO_tell_impl((fileio *)self);
|
||||
}
|
||||
|
||||
#if defined(HAVE_FTRUNCATE)
|
||||
|
@ -475,7 +475,7 @@ static PyObject *
|
|||
_io_FileIO_truncate_impl(fileio *self, PyTypeObject *cls, PyObject *posobj);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_truncate(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_truncate(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -504,7 +504,7 @@ _io_FileIO_truncate(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s
|
|||
}
|
||||
posobj = args[0];
|
||||
skip_optional_posonly:
|
||||
return_value = _io_FileIO_truncate_impl(self, cls, posobj);
|
||||
return_value = _io_FileIO_truncate_impl((fileio *)self, cls, posobj);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -525,12 +525,12 @@ static PyObject *
|
|||
_io_FileIO_isatty_impl(fileio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_FileIO_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_FileIO_isatty_impl(self);
|
||||
return _io_FileIO_isatty_impl((fileio *)self);
|
||||
}
|
||||
|
||||
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
|
||||
#define _IO_FILEIO_TRUNCATE_METHODDEF
|
||||
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
|
||||
/*[clinic end generated code: output=1c262ae135da4dcb input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=dcbeb6a0b13e4b1f input=a9049054013a1b77]*/
|
||||
|
|
64
Modules/_io/clinic/stringio.c.h
generated
64
Modules/_io/clinic/stringio.c.h
generated
|
@ -23,12 +23,12 @@ static PyObject *
|
|||
_io_StringIO_getvalue_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_getvalue(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO_getvalue(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_getvalue_impl(self);
|
||||
return_value = _io_StringIO_getvalue_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -47,12 +47,12 @@ static PyObject *
|
|||
_io_StringIO_tell_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_tell(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_tell_impl(self);
|
||||
return_value = _io_StringIO_tell_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -74,7 +74,7 @@ static PyObject *
|
|||
_io_StringIO_read_impl(stringio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_read(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_StringIO_read(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -90,7 +90,7 @@ _io_StringIO_read(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_read_impl(self, size);
|
||||
return_value = _io_StringIO_read_impl((stringio *)self, size);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -112,7 +112,7 @@ static PyObject *
|
|||
_io_StringIO_readline_impl(stringio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_readline(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_StringIO_readline(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -128,7 +128,7 @@ _io_StringIO_readline(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_readline_impl(self, size);
|
||||
return_value = _io_StringIO_readline_impl((stringio *)self, size);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -152,10 +152,10 @@ static PyObject *
|
|||
_io_StringIO_truncate_impl(stringio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_truncate(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_StringIO_truncate(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = self->pos;
|
||||
Py_ssize_t size = ((stringio *)self)->pos;
|
||||
|
||||
if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
|
||||
goto exit;
|
||||
|
@ -168,7 +168,7 @@ _io_StringIO_truncate(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_truncate_impl(self, size);
|
||||
return_value = _io_StringIO_truncate_impl((stringio *)self, size);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -194,7 +194,7 @@ static PyObject *
|
|||
_io_StringIO_seek_impl(stringio *self, Py_ssize_t pos, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_seek(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_StringIO_seek(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t pos;
|
||||
|
@ -224,7 +224,7 @@ _io_StringIO_seek(stringio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_seek_impl(self, pos, whence);
|
||||
return_value = _io_StringIO_seek_impl((stringio *)self, pos, whence);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -252,7 +252,7 @@ _io_StringIO_write(stringio *self, PyObject *obj)
|
|||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_write_impl(self, obj);
|
||||
return_value = _io_StringIO_write_impl((stringio *)self, obj);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -276,12 +276,12 @@ static PyObject *
|
|||
_io_StringIO_close_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_close(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO_close(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_close_impl(self);
|
||||
return_value = _io_StringIO_close_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -371,12 +371,12 @@ static PyObject *
|
|||
_io_StringIO_readable_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_readable(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_readable_impl(self);
|
||||
return_value = _io_StringIO_readable_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -395,12 +395,12 @@ static PyObject *
|
|||
_io_StringIO_writable_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_writable(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_writable_impl(self);
|
||||
return_value = _io_StringIO_writable_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -419,12 +419,12 @@ static PyObject *
|
|||
_io_StringIO_seekable_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_seekable_impl(self);
|
||||
return_value = _io_StringIO_seekable_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -442,12 +442,12 @@ static PyObject *
|
|||
_io_StringIO___getstate___impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO___getstate__(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_StringIO___getstate__(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO___getstate___impl(self);
|
||||
return_value = _io_StringIO___getstate___impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -470,7 +470,7 @@ _io_StringIO___setstate__(stringio *self, PyObject *state)
|
|||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO___setstate___impl(self, state);
|
||||
return_value = _io_StringIO___setstate___impl((stringio *)self, state);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -490,12 +490,12 @@ static PyObject *
|
|||
_io_StringIO_closed_get_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_closed_get(stringio *self, void *Py_UNUSED(context))
|
||||
_io_StringIO_closed_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_closed_get_impl(self);
|
||||
return_value = _io_StringIO_closed_get_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -515,12 +515,12 @@ static PyObject *
|
|||
_io_StringIO_line_buffering_get_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_line_buffering_get(stringio *self, void *Py_UNUSED(context))
|
||||
_io_StringIO_line_buffering_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_line_buffering_get_impl(self);
|
||||
return_value = _io_StringIO_line_buffering_get_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -540,14 +540,14 @@ static PyObject *
|
|||
_io_StringIO_newlines_get_impl(stringio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_StringIO_newlines_get(stringio *self, void *Py_UNUSED(context))
|
||||
_io_StringIO_newlines_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_StringIO_newlines_get_impl(self);
|
||||
return_value = _io_StringIO_newlines_get_impl((stringio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=9d2b092274469d42 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=7796e223e778a214 input=a9049054013a1b77]*/
|
||||
|
|
98
Modules/_io/clinic/textio.c.h
generated
98
Modules/_io/clinic/textio.c.h
generated
|
@ -379,7 +379,7 @@ _io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
|
|||
PyObject *input, int final);
|
||||
|
||||
static PyObject *
|
||||
_io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_IncrementalNewlineDecoder_decode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -426,7 +426,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *ar
|
|||
goto exit;
|
||||
}
|
||||
skip_optional_pos:
|
||||
return_value = _io_IncrementalNewlineDecoder_decode_impl(self, input, final);
|
||||
return_value = _io_IncrementalNewlineDecoder_decode_impl((nldecoder_object *)self, input, final);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -444,9 +444,9 @@ static PyObject *
|
|||
_io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self);
|
||||
|
||||
static PyObject *
|
||||
_io_IncrementalNewlineDecoder_getstate(nldecoder_object *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_IncrementalNewlineDecoder_getstate(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_IncrementalNewlineDecoder_getstate_impl(self);
|
||||
return _io_IncrementalNewlineDecoder_getstate_impl((nldecoder_object *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_IncrementalNewlineDecoder_setstate__doc__,
|
||||
|
@ -469,9 +469,9 @@ static PyObject *
|
|||
_io_IncrementalNewlineDecoder_reset_impl(nldecoder_object *self);
|
||||
|
||||
static PyObject *
|
||||
_io_IncrementalNewlineDecoder_reset(nldecoder_object *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_IncrementalNewlineDecoder_reset(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io_IncrementalNewlineDecoder_reset_impl(self);
|
||||
return _io_IncrementalNewlineDecoder_reset_impl((nldecoder_object *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_io_TextIOWrapper___init____doc__,
|
||||
|
@ -654,7 +654,7 @@ _io_TextIOWrapper_reconfigure_impl(textio *self, PyObject *encoding,
|
|||
PyObject *write_through_obj);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_TextIOWrapper_reconfigure(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -725,7 +725,7 @@ _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t na
|
|||
write_through_obj = args[4];
|
||||
skip_optional_kwonly:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_reconfigure_impl(self, encoding, errors, newline_obj, line_buffering_obj, write_through_obj);
|
||||
return_value = _io_TextIOWrapper_reconfigure_impl((textio *)self, encoding, errors, newline_obj, line_buffering_obj, write_through_obj);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -744,12 +744,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_detach_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_detach(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_detach(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_detach_impl(self);
|
||||
return_value = _io_TextIOWrapper_detach_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -767,7 +767,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_write_impl(textio *self, PyObject *text);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_write(textio *self, PyObject *arg)
|
||||
_io_TextIOWrapper_write(PyObject *self, PyObject *arg)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *text;
|
||||
|
@ -778,7 +778,7 @@ _io_TextIOWrapper_write(textio *self, PyObject *arg)
|
|||
}
|
||||
text = arg;
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_write_impl(self, text);
|
||||
return_value = _io_TextIOWrapper_write_impl((textio *)self, text);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -797,7 +797,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_read(textio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_TextIOWrapper_read(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
@ -813,7 +813,7 @@ _io_TextIOWrapper_read(textio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_read_impl(self, n);
|
||||
return_value = _io_TextIOWrapper_read_impl((textio *)self, n);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -832,7 +832,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_readline(textio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_TextIOWrapper_readline(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -857,7 +857,7 @@ _io_TextIOWrapper_readline(textio *self, PyObject *const *args, Py_ssize_t nargs
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_readline_impl(self, size);
|
||||
return_value = _io_TextIOWrapper_readline_impl((textio *)self, size);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -894,7 +894,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_seek(textio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_TextIOWrapper_seek(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *cookieObj;
|
||||
|
@ -913,7 +913,7 @@ _io_TextIOWrapper_seek(textio *self, PyObject *const *args, Py_ssize_t nargs)
|
|||
}
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
|
||||
return_value = _io_TextIOWrapper_seek_impl((textio *)self, cookieObj, whence);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -936,12 +936,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_tell_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_tell(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_tell_impl(self);
|
||||
return_value = _io_TextIOWrapper_tell_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -959,7 +959,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_truncate(textio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_io_TextIOWrapper_truncate(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *pos = Py_None;
|
||||
|
@ -973,7 +973,7 @@ _io_TextIOWrapper_truncate(textio *self, PyObject *const *args, Py_ssize_t nargs
|
|||
pos = args[0];
|
||||
skip_optional:
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
|
||||
return_value = _io_TextIOWrapper_truncate_impl((textio *)self, pos);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
exit:
|
||||
|
@ -992,12 +992,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_fileno_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_fileno(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_fileno(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_fileno_impl(self);
|
||||
return_value = _io_TextIOWrapper_fileno_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1015,12 +1015,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_seekable_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_seekable(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_seekable_impl(self);
|
||||
return_value = _io_TextIOWrapper_seekable_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1038,12 +1038,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_readable_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_readable(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_readable_impl(self);
|
||||
return_value = _io_TextIOWrapper_readable_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1061,12 +1061,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_writable_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_writable(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_writable_impl(self);
|
||||
return_value = _io_TextIOWrapper_writable_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1084,12 +1084,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_isatty_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_isatty(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_isatty_impl(self);
|
||||
return_value = _io_TextIOWrapper_isatty_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1107,12 +1107,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_flush_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_flush(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_flush(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_flush_impl(self);
|
||||
return_value = _io_TextIOWrapper_flush_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1130,12 +1130,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_close_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io_TextIOWrapper_close(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_close_impl(self);
|
||||
return_value = _io_TextIOWrapper_close_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1155,12 +1155,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_name_get_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_name_get(textio *self, void *Py_UNUSED(context))
|
||||
_io_TextIOWrapper_name_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_name_get_impl(self);
|
||||
return_value = _io_TextIOWrapper_name_get_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1180,12 +1180,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_closed_get_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_closed_get(textio *self, void *Py_UNUSED(context))
|
||||
_io_TextIOWrapper_closed_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_closed_get_impl(self);
|
||||
return_value = _io_TextIOWrapper_closed_get_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1205,12 +1205,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_newlines_get_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_newlines_get(textio *self, void *Py_UNUSED(context))
|
||||
_io_TextIOWrapper_newlines_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_newlines_get_impl(self);
|
||||
return_value = _io_TextIOWrapper_newlines_get_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1230,12 +1230,12 @@ static PyObject *
|
|||
_io_TextIOWrapper_errors_get_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_errors_get(textio *self, void *Py_UNUSED(context))
|
||||
_io_TextIOWrapper_errors_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper_errors_get_impl(self);
|
||||
return_value = _io_TextIOWrapper_errors_get_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1255,12 +1255,12 @@ static PyObject *
|
|||
_io_TextIOWrapper__CHUNK_SIZE_get_impl(textio *self);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper__CHUNK_SIZE_get(textio *self, void *Py_UNUSED(context))
|
||||
_io_TextIOWrapper__CHUNK_SIZE_get(PyObject *self, void *Py_UNUSED(context))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper__CHUNK_SIZE_get_impl(self);
|
||||
return_value = _io_TextIOWrapper__CHUNK_SIZE_get_impl((textio *)self);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
|
@ -1280,14 +1280,14 @@ static int
|
|||
_io_TextIOWrapper__CHUNK_SIZE_set_impl(textio *self, PyObject *value);
|
||||
|
||||
static int
|
||||
_io_TextIOWrapper__CHUNK_SIZE_set(textio *self, PyObject *value, void *Py_UNUSED(context))
|
||||
_io_TextIOWrapper__CHUNK_SIZE_set(PyObject *self, PyObject *value, void *Py_UNUSED(context))
|
||||
{
|
||||
int return_value;
|
||||
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
return_value = _io_TextIOWrapper__CHUNK_SIZE_set_impl(self, value);
|
||||
return_value = _io_TextIOWrapper__CHUNK_SIZE_set_impl((textio *)self, value);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=423a320f087792b9 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=6e64e43113a97340 input=a9049054013a1b77]*/
|
||||
|
|
38
Modules/_io/clinic/winconsoleio.c.h
generated
38
Modules/_io/clinic/winconsoleio.c.h
generated
|
@ -27,13 +27,13 @@ static PyObject *
|
|||
_io__WindowsConsoleIO_close_impl(winconsoleio *self, PyTypeObject *cls);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_close(winconsoleio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__WindowsConsoleIO_close(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
|
||||
PyErr_SetString(PyExc_TypeError, "close() takes no arguments");
|
||||
return NULL;
|
||||
}
|
||||
return _io__WindowsConsoleIO_close_impl(self, cls);
|
||||
return _io__WindowsConsoleIO_close_impl((winconsoleio *)self, cls);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_WINDOWS_CONSOLE_IO) */
|
||||
|
@ -154,9 +154,9 @@ static PyObject *
|
|||
_io__WindowsConsoleIO_fileno_impl(winconsoleio *self);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_fileno(winconsoleio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__WindowsConsoleIO_fileno(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io__WindowsConsoleIO_fileno_impl(self);
|
||||
return _io__WindowsConsoleIO_fileno_impl((winconsoleio *)self);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_WINDOWS_CONSOLE_IO) */
|
||||
|
@ -176,9 +176,9 @@ static PyObject *
|
|||
_io__WindowsConsoleIO_readable_impl(winconsoleio *self);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_readable(winconsoleio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__WindowsConsoleIO_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io__WindowsConsoleIO_readable_impl(self);
|
||||
return _io__WindowsConsoleIO_readable_impl((winconsoleio *)self);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_WINDOWS_CONSOLE_IO) */
|
||||
|
@ -198,9 +198,9 @@ static PyObject *
|
|||
_io__WindowsConsoleIO_writable_impl(winconsoleio *self);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_writable(winconsoleio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__WindowsConsoleIO_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io__WindowsConsoleIO_writable_impl(self);
|
||||
return _io__WindowsConsoleIO_writable_impl((winconsoleio *)self);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_WINDOWS_CONSOLE_IO) */
|
||||
|
@ -221,7 +221,7 @@ _io__WindowsConsoleIO_readinto_impl(winconsoleio *self, PyTypeObject *cls,
|
|||
Py_buffer *buffer);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_readinto(winconsoleio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__WindowsConsoleIO_readinto(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -249,7 +249,7 @@ _io__WindowsConsoleIO_readinto(winconsoleio *self, PyTypeObject *cls, PyObject *
|
|||
_PyArg_BadArgument("readinto", "argument 1", "read-write bytes-like object", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__WindowsConsoleIO_readinto_impl(self, cls, &buffer);
|
||||
return_value = _io__WindowsConsoleIO_readinto_impl((winconsoleio *)self, cls, &buffer);
|
||||
|
||||
exit:
|
||||
/* Cleanup for buffer */
|
||||
|
@ -279,9 +279,9 @@ static PyObject *
|
|||
_io__WindowsConsoleIO_readall_impl(winconsoleio *self);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_readall(winconsoleio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__WindowsConsoleIO_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io__WindowsConsoleIO_readall_impl(self);
|
||||
return _io__WindowsConsoleIO_readall_impl((winconsoleio *)self);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_WINDOWS_CONSOLE_IO) */
|
||||
|
@ -306,7 +306,7 @@ _io__WindowsConsoleIO_read_impl(winconsoleio *self, PyTypeObject *cls,
|
|||
Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_read(winconsoleio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__WindowsConsoleIO_read(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -337,7 +337,7 @@ _io__WindowsConsoleIO_read(winconsoleio *self, PyTypeObject *cls, PyObject *cons
|
|||
goto exit;
|
||||
}
|
||||
skip_optional_posonly:
|
||||
return_value = _io__WindowsConsoleIO_read_impl(self, cls, size);
|
||||
return_value = _io__WindowsConsoleIO_read_impl((winconsoleio *)self, cls, size);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -364,7 +364,7 @@ _io__WindowsConsoleIO_write_impl(winconsoleio *self, PyTypeObject *cls,
|
|||
Py_buffer *b);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_write(winconsoleio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__WindowsConsoleIO_write(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
||||
|
@ -391,7 +391,7 @@ _io__WindowsConsoleIO_write(winconsoleio *self, PyTypeObject *cls, PyObject *con
|
|||
if (PyObject_GetBuffer(args[0], &b, PyBUF_SIMPLE) != 0) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__WindowsConsoleIO_write_impl(self, cls, &b);
|
||||
return_value = _io__WindowsConsoleIO_write_impl((winconsoleio *)self, cls, &b);
|
||||
|
||||
exit:
|
||||
/* Cleanup for b */
|
||||
|
@ -419,9 +419,9 @@ static PyObject *
|
|||
_io__WindowsConsoleIO_isatty_impl(winconsoleio *self);
|
||||
|
||||
static PyObject *
|
||||
_io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored))
|
||||
_io__WindowsConsoleIO_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _io__WindowsConsoleIO_isatty_impl(self);
|
||||
return _io__WindowsConsoleIO_isatty_impl((winconsoleio *)self);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_WINDOWS_CONSOLE_IO) */
|
||||
|
@ -461,4 +461,4 @@ _io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored))
|
|||
#ifndef _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF
|
||||
#define _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF
|
||||
#endif /* !defined(_IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF) */
|
||||
/*[clinic end generated code: output=78e0f6abf4de2d6d input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=edc47f5c49589045 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -437,7 +437,7 @@ stringio_iternext(stringio *self)
|
|||
/*[clinic input]
|
||||
@critical_section
|
||||
_io.StringIO.truncate
|
||||
pos as size: Py_ssize_t(accept={int, NoneType}, c_default="self->pos") = None
|
||||
pos as size: Py_ssize_t(accept={int, NoneType}, c_default="((stringio *)self)->pos") = None
|
||||
/
|
||||
|
||||
Truncate size to pos.
|
||||
|
@ -449,7 +449,7 @@ Returns the new absolute position.
|
|||
|
||||
static PyObject *
|
||||
_io_StringIO_truncate_impl(stringio *self, Py_ssize_t size)
|
||||
/*[clinic end generated code: output=eb3aef8e06701365 input=461b872dce238452]*/
|
||||
/*[clinic end generated code: output=eb3aef8e06701365 input=fa8a6c98bb2ba780]*/
|
||||
{
|
||||
CHECK_INITIALIZED(self);
|
||||
CHECK_CLOSED(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue