gh-111178: Change Argument Clinic signature for METH_O (#130682)

Use "PyObject*" for METH_O functions to fix an undefined behavior.
This commit is contained in:
Victor Stinner 2025-03-11 16:33:36 +01:00 committed by GitHub
parent 4162bc133b
commit 9d759b63d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 843 additions and 190 deletions

View file

@ -4940,7 +4940,7 @@ static int
Test_metho_not_default_return_converter_impl(TestObj *self, PyObject *a);
static PyObject *
Test_metho_not_default_return_converter(TestObj *self, PyObject *a)
Test_metho_not_default_return_converter(PyObject *self, PyObject *a)
{
PyObject *return_value = NULL;
int _return_value;
@ -4957,7 +4957,7 @@ exit:
static int
Test_metho_not_default_return_converter_impl(TestObj *self, PyObject *a)
/*[clinic end generated code: output=b2cce75a7af2e6ce input=428657129b521177]*/
/*[clinic end generated code: output=8b03f5213c312138 input=428657129b521177]*/
/*[clinic input]

View file

@ -2738,8 +2738,8 @@ _asyncio.Task.set_result
[clinic start generated code]*/
static PyObject *
_asyncio_Task_set_result(TaskObj *self, PyObject *result)
/*[clinic end generated code: output=1dcae308bfcba318 input=9d1a00c07be41bab]*/
_asyncio_Task_set_result_impl(TaskObj *self, PyObject *result)
/*[clinic end generated code: output=e9d8e3cdaf18e258 input=9d1a00c07be41bab]*/
{
PyErr_SetString(PyExc_RuntimeError,
"Task does not support set_result operation");
@ -2754,8 +2754,8 @@ _asyncio.Task.set_exception
[clinic start generated code]*/
static PyObject *
_asyncio_Task_set_exception(TaskObj *self, PyObject *exception)
/*[clinic end generated code: output=bc377fc28067303d input=9a8f65c83dcf893a]*/
_asyncio_Task_set_exception_impl(TaskObj *self, PyObject *exception)
/*[clinic end generated code: output=96a91790c192cc7d input=9a8f65c83dcf893a]*/
{
PyErr_SetString(PyExc_RuntimeError,
"Task does not support set_exception operation");

View file

@ -484,7 +484,7 @@ deque_extend_impl(dequeobject *deque, PyObject *iterable)
PyObject *s = PySequence_List(iterable);
if (s == NULL)
return NULL;
result = deque_extend(deque, s);
result = deque_extend((PyObject*)deque, s);
Py_DECREF(s);
return result;
}
@ -578,7 +578,7 @@ deque_inplace_concat(PyObject *self, PyObject *other)
PyObject *result;
// deque_extend is thread-safe
result = deque_extend(deque, other);
result = deque_extend((PyObject*)deque, other);
if (result == NULL)
return result;
Py_INCREF(deque);

View file

@ -2309,8 +2309,8 @@ This information can be later retrieved using the getwin() function.
[clinic start generated code]*/
static PyObject *
_curses_window_putwin(PyCursesWindowObject *self, PyObject *file)
/*[clinic end generated code: output=3a25e2a5e7a040ac input=0608648e09c8ea0a]*/
_curses_window_putwin_impl(PyCursesWindowObject *self, PyObject *file)
/*[clinic end generated code: output=fdae68ac59b0281b input=0608648e09c8ea0a]*/
{
/* We have to simulate this by writing to a temporary FILE*,
then reading back, then writing to the argument file. */

View file

@ -2951,8 +2951,8 @@ _elementtree.TreeBuilder.data
[clinic start generated code]*/
static PyObject *
_elementtree_TreeBuilder_data(TreeBuilderObject *self, PyObject *data)
/*[clinic end generated code: output=69144c7100795bb2 input=a0540c532b284d29]*/
_elementtree_TreeBuilder_data_impl(TreeBuilderObject *self, PyObject *data)
/*[clinic end generated code: output=dfa02b68f732b8c0 input=a0540c532b284d29]*/
{
return treebuilder_handle_data(self, data);
}
@ -2966,8 +2966,8 @@ _elementtree.TreeBuilder.end
[clinic start generated code]*/
static PyObject *
_elementtree_TreeBuilder_end(TreeBuilderObject *self, PyObject *tag)
/*[clinic end generated code: output=9a98727cc691cd9d input=22dc3674236f5745]*/
_elementtree_TreeBuilder_end_impl(TreeBuilderObject *self, PyObject *tag)
/*[clinic end generated code: output=84cb6ca9008ec740 input=22dc3674236f5745]*/
{
return treebuilder_handle_end(self, tag);
}
@ -2981,8 +2981,9 @@ _elementtree.TreeBuilder.comment
[clinic start generated code]*/
static PyObject *
_elementtree_TreeBuilder_comment(TreeBuilderObject *self, PyObject *text)
/*[clinic end generated code: output=22835be41deeaa27 input=47e7ebc48ed01dfa]*/
_elementtree_TreeBuilder_comment_impl(TreeBuilderObject *self,
PyObject *text)
/*[clinic end generated code: output=a555ef39027c3823 input=47e7ebc48ed01dfa]*/
{
return treebuilder_handle_comment(self, text);
}
@ -3949,8 +3950,8 @@ _elementtree.XMLParser.feed
[clinic start generated code]*/
static PyObject *
_elementtree_XMLParser_feed(XMLParserObject *self, PyObject *data)
/*[clinic end generated code: output=e42b6a78eec7446d input=fe231b6b8de3ce1f]*/
_elementtree_XMLParser_feed_impl(XMLParserObject *self, PyObject *data)
/*[clinic end generated code: output=503e6fbf1adf17ab input=fe231b6b8de3ce1f]*/
{
/* feed data to parser */
@ -3997,8 +3998,9 @@ _elementtree.XMLParser._parse_whole
[clinic start generated code]*/
static PyObject *
_elementtree_XMLParser__parse_whole(XMLParserObject *self, PyObject *file)
/*[clinic end generated code: output=f797197bb818dda3 input=19ecc893b6f3e752]*/
_elementtree_XMLParser__parse_whole_impl(XMLParserObject *self,
PyObject *file)
/*[clinic end generated code: output=60718a4e63d237d2 input=19ecc893b6f3e752]*/
{
/* (internal) parse the whole input, until end of stream */
PyObject* reader;

View file

@ -645,8 +645,8 @@ Update this hash object's state with the provided string.
[clinic start generated code]*/
static PyObject *
EVP_update(EVPobject *self, PyObject *obj)
/*[clinic end generated code: output=ec1d55ed2432e966 input=9b30ec848f015501]*/
EVP_update_impl(EVPobject *self, PyObject *obj)
/*[clinic end generated code: output=d56f91c68348f95f input=9b30ec848f015501]*/
{
int result;
Py_buffer view;

View file

@ -472,8 +472,8 @@ _io._Buffered._dealloc_warn
[clinic start generated code]*/
static PyObject *
_io__Buffered__dealloc_warn(buffered *self, PyObject *source)
/*[clinic end generated code: output=690dcc3df8967162 input=8f845f2a4786391c]*/
_io__Buffered__dealloc_warn_impl(buffered *self, PyObject *source)
/*[clinic end generated code: output=d8db21c6dec0e614 input=8f845f2a4786391c]*/
{
if (self->ok && self->raw) {
PyObject *r;
@ -560,7 +560,7 @@ _io__Buffered_close_impl(buffered *self)
}
if (self->finalizing) {
PyObject *r = _io__Buffered__dealloc_warn(self, (PyObject *) self);
PyObject *r = _io__Buffered__dealloc_warn_impl(self, (PyObject *)self);
if (r)
Py_DECREF(r);
else

View file

@ -710,8 +710,8 @@ Return the number of bytes written.
[clinic start generated code]*/
static PyObject *
_io_BytesIO_write(bytesio *self, PyObject *b)
/*[clinic end generated code: output=53316d99800a0b95 input=f5ec7c8c64ed720a]*/
_io_BytesIO_write_impl(bytesio *self, PyObject *b)
/*[clinic end generated code: output=d3e46bcec8d9e21c input=f5ec7c8c64ed720a]*/
{
Py_ssize_t n = write_bytes(self, b);
return n >= 0 ? PyLong_FromSsize_t(n) : NULL;
@ -730,8 +730,8 @@ each element.
[clinic start generated code]*/
static PyObject *
_io_BytesIO_writelines(bytesio *self, PyObject *lines)
/*[clinic end generated code: output=7f33aa3271c91752 input=e972539176fc8fc1]*/
_io_BytesIO_writelines_impl(bytesio *self, PyObject *lines)
/*[clinic end generated code: output=03a43a75773bc397 input=e972539176fc8fc1]*/
{
PyObject *it, *item;
@ -842,7 +842,7 @@ bytesio_setstate(PyObject *op, PyObject *state)
/* Set the value of the internal buffer. If state[0] does not support the
buffer protocol, bytesio_write will raise the appropriate TypeError. */
result = _io_BytesIO_write(self, PyTuple_GET_ITEM(state, 0));
result = _io_BytesIO_write_impl(self, PyTuple_GET_ITEM(state, 0));
if (result == NULL)
return NULL;
Py_DECREF(result);
@ -958,7 +958,7 @@ _io_BytesIO___init___impl(bytesio *self, PyObject *initvalue)
}
else {
PyObject *res;
res = _io_BytesIO_write(self, initvalue);
res = _io_BytesIO_write_impl(self, initvalue);
if (res == NULL)
return -1;
Py_DECREF(res);

View file

@ -307,6 +307,19 @@ PyDoc_STRVAR(_io__Buffered__dealloc_warn__doc__,
#define _IO__BUFFERED__DEALLOC_WARN_METHODDEF \
{"_dealloc_warn", (PyCFunction)_io__Buffered__dealloc_warn, METH_O, _io__Buffered__dealloc_warn__doc__},
static PyObject *
_io__Buffered__dealloc_warn_impl(buffered *self, PyObject *source);
static PyObject *
_io__Buffered__dealloc_warn(PyObject *self, PyObject *source)
{
PyObject *return_value = NULL;
return_value = _io__Buffered__dealloc_warn_impl((buffered *)self, source);
return return_value;
}
PyDoc_STRVAR(_io__Buffered_simple_flush__doc__,
"flush($self, /)\n"
"--\n"
@ -1246,4 +1259,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=f019d29701ba2556 input=a9049054013a1b77]*/
/*[clinic end generated code: output=1a0562c66776fd53 input=a9049054013a1b77]*/

View file

@ -445,6 +445,19 @@ PyDoc_STRVAR(_io_BytesIO_write__doc__,
#define _IO_BYTESIO_WRITE_METHODDEF \
{"write", (PyCFunction)_io_BytesIO_write, METH_O, _io_BytesIO_write__doc__},
static PyObject *
_io_BytesIO_write_impl(bytesio *self, PyObject *b);
static PyObject *
_io_BytesIO_write(PyObject *self, PyObject *b)
{
PyObject *return_value = NULL;
return_value = _io_BytesIO_write_impl((bytesio *)self, b);
return return_value;
}
PyDoc_STRVAR(_io_BytesIO_writelines__doc__,
"writelines($self, lines, /)\n"
"--\n"
@ -458,6 +471,19 @@ PyDoc_STRVAR(_io_BytesIO_writelines__doc__,
#define _IO_BYTESIO_WRITELINES_METHODDEF \
{"writelines", (PyCFunction)_io_BytesIO_writelines, METH_O, _io_BytesIO_writelines__doc__},
static PyObject *
_io_BytesIO_writelines_impl(bytesio *self, PyObject *lines);
static PyObject *
_io_BytesIO_writelines(PyObject *self, PyObject *lines)
{
PyObject *return_value = NULL;
return_value = _io_BytesIO_writelines_impl((bytesio *)self, lines);
return return_value;
}
PyDoc_STRVAR(_io_BytesIO_close__doc__,
"close($self, /)\n"
"--\n"
@ -535,4 +561,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=8a5e153bc7584b55 input=a9049054013a1b77]*/
/*[clinic end generated code: output=477217b2bc464110 input=a9049054013a1b77]*/

View file

@ -247,7 +247,7 @@ static PyObject *
_io_StringIO_write_impl(stringio *self, PyObject *obj);
static PyObject *
_io_StringIO_write(stringio *self, PyObject *obj)
_io_StringIO_write(PyObject *self, PyObject *obj)
{
PyObject *return_value = NULL;
@ -465,7 +465,7 @@ static PyObject *
_io_StringIO___setstate___impl(stringio *self, PyObject *state);
static PyObject *
_io_StringIO___setstate__(stringio *self, PyObject *state)
_io_StringIO___setstate__(PyObject *self, PyObject *state)
{
PyObject *return_value = NULL;
@ -550,4 +550,4 @@ _io_StringIO_newlines_get(PyObject *self, void *Py_UNUSED(context))
return return_value;
}
/*[clinic end generated code: output=7796e223e778a214 input=a9049054013a1b77]*/
/*[clinic end generated code: output=69c9b100a359cbd5 input=a9049054013a1b77]*/

View file

@ -457,6 +457,20 @@ PyDoc_STRVAR(_io_IncrementalNewlineDecoder_setstate__doc__,
#define _IO_INCREMENTALNEWLINEDECODER_SETSTATE_METHODDEF \
{"setstate", (PyCFunction)_io_IncrementalNewlineDecoder_setstate, METH_O, _io_IncrementalNewlineDecoder_setstate__doc__},
static PyObject *
_io_IncrementalNewlineDecoder_setstate_impl(nldecoder_object *self,
PyObject *state);
static PyObject *
_io_IncrementalNewlineDecoder_setstate(PyObject *self, PyObject *state)
{
PyObject *return_value = NULL;
return_value = _io_IncrementalNewlineDecoder_setstate_impl((nldecoder_object *)self, state);
return return_value;
}
PyDoc_STRVAR(_io_IncrementalNewlineDecoder_reset__doc__,
"reset($self, /)\n"
"--\n"
@ -1290,4 +1304,4 @@ _io_TextIOWrapper__CHUNK_SIZE_set(PyObject *self, PyObject *value, void *Py_UNUS
return return_value;
}
/*[clinic end generated code: output=6e64e43113a97340 input=a9049054013a1b77]*/
/*[clinic end generated code: output=dad68d8c33d676e6 input=a9049054013a1b77]*/

View file

@ -579,9 +579,9 @@ _io.IncrementalNewlineDecoder.setstate
[clinic start generated code]*/
static PyObject *
_io_IncrementalNewlineDecoder_setstate(nldecoder_object *self,
PyObject *state)
/*[clinic end generated code: output=c10c622508b576cb input=c53fb505a76dbbe2]*/
_io_IncrementalNewlineDecoder_setstate_impl(nldecoder_object *self,
PyObject *state)
/*[clinic end generated code: output=09135cb6e78a1dc8 input=c53fb505a76dbbe2]*/
{
PyObject *buffer;
unsigned long long flag;

View file

@ -1195,6 +1195,20 @@ PyDoc_STRVAR(pysqlite_connection_executescript__doc__,
#define PYSQLITE_CONNECTION_EXECUTESCRIPT_METHODDEF \
{"executescript", (PyCFunction)pysqlite_connection_executescript, METH_O, pysqlite_connection_executescript__doc__},
static PyObject *
pysqlite_connection_executescript_impl(pysqlite_Connection *self,
PyObject *script_obj);
static PyObject *
pysqlite_connection_executescript(PyObject *self, PyObject *script_obj)
{
PyObject *return_value = NULL;
return_value = pysqlite_connection_executescript_impl((pysqlite_Connection *)self, script_obj);
return return_value;
}
PyDoc_STRVAR(pysqlite_connection_interrupt__doc__,
"interrupt($self, /)\n"
"--\n"
@ -1881,4 +1895,4 @@ exit:
#ifndef DESERIALIZE_METHODDEF
#define DESERIALIZE_METHODDEF
#endif /* !defined(DESERIALIZE_METHODDEF) */
/*[clinic end generated code: output=c59effb407b8ea4d input=a9049054013a1b77]*/
/*[clinic end generated code: output=fc4857f09ad563b1 input=a9049054013a1b77]*/

View file

@ -262,6 +262,19 @@ PyDoc_STRVAR(pysqlite_cursor_setinputsizes__doc__,
#define PYSQLITE_CURSOR_SETINPUTSIZES_METHODDEF \
{"setinputsizes", (PyCFunction)pysqlite_cursor_setinputsizes, METH_O, pysqlite_cursor_setinputsizes__doc__},
static PyObject *
pysqlite_cursor_setinputsizes_impl(pysqlite_Cursor *self, PyObject *sizes);
static PyObject *
pysqlite_cursor_setinputsizes(PyObject *self, PyObject *sizes)
{
PyObject *return_value = NULL;
return_value = pysqlite_cursor_setinputsizes_impl((pysqlite_Cursor *)self, sizes);
return return_value;
}
PyDoc_STRVAR(pysqlite_cursor_setoutputsize__doc__,
"setoutputsize($self, size, column=None, /)\n"
"--\n"
@ -314,4 +327,4 @@ pysqlite_cursor_close(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return pysqlite_cursor_close_impl((pysqlite_Cursor *)self);
}
/*[clinic end generated code: output=82620ca7622b547c input=a9049054013a1b77]*/
/*[clinic end generated code: output=02831aed7377f5f6 input=a9049054013a1b77]*/

View file

@ -1908,9 +1908,9 @@ Executes multiple SQL statements at once.
[clinic start generated code]*/
static PyObject *
pysqlite_connection_executescript(pysqlite_Connection *self,
PyObject *script_obj)
/*[clinic end generated code: output=4c4f9d77aa0ae37d input=f6e5f1ccfa313db4]*/
pysqlite_connection_executescript_impl(pysqlite_Connection *self,
PyObject *script_obj)
/*[clinic end generated code: output=e921c49e2291782c input=f6e5f1ccfa313db4]*/
{
PyObject* result = 0;

View file

@ -1243,8 +1243,8 @@ Required by DB-API. Does nothing in sqlite3.
[clinic start generated code]*/
static PyObject *
pysqlite_cursor_setinputsizes(pysqlite_Cursor *self, PyObject *sizes)
/*[clinic end generated code: output=893c817afe9d08ad input=de7950a3aec79bdf]*/
pysqlite_cursor_setinputsizes_impl(pysqlite_Cursor *self, PyObject *sizes)
/*[clinic end generated code: output=a06c12790bd05f2e input=de7950a3aec79bdf]*/
{
Py_RETURN_NONE;
}

View file

@ -985,6 +985,19 @@ PyDoc_STRVAR(_sre_SRE_Pattern___deepcopy____doc__,
#define _SRE_SRE_PATTERN___DEEPCOPY___METHODDEF \
{"__deepcopy__", (PyCFunction)_sre_SRE_Pattern___deepcopy__, METH_O, _sre_SRE_Pattern___deepcopy____doc__},
static PyObject *
_sre_SRE_Pattern___deepcopy___impl(PatternObject *self, PyObject *memo);
static PyObject *
_sre_SRE_Pattern___deepcopy__(PyObject *self, PyObject *memo)
{
PyObject *return_value = NULL;
return_value = _sre_SRE_Pattern___deepcopy___impl((PatternObject *)self, memo);
return return_value;
}
#if defined(Py_DEBUG)
PyDoc_STRVAR(_sre_SRE_Pattern__fail_after__doc__,
@ -1471,6 +1484,19 @@ PyDoc_STRVAR(_sre_SRE_Match___deepcopy____doc__,
#define _SRE_SRE_MATCH___DEEPCOPY___METHODDEF \
{"__deepcopy__", (PyCFunction)_sre_SRE_Match___deepcopy__, METH_O, _sre_SRE_Match___deepcopy____doc__},
static PyObject *
_sre_SRE_Match___deepcopy___impl(MatchObject *self, PyObject *memo);
static PyObject *
_sre_SRE_Match___deepcopy__(PyObject *self, PyObject *memo)
{
PyObject *return_value = NULL;
return_value = _sre_SRE_Match___deepcopy___impl((MatchObject *)self, memo);
return return_value;
}
PyDoc_STRVAR(_sre_SRE_Scanner_match__doc__,
"match($self, /)\n"
"--\n"
@ -1516,4 +1542,4 @@ _sre_SRE_Scanner_search(PyObject *self, PyTypeObject *cls, PyObject *const *args
#ifndef _SRE_SRE_PATTERN__FAIL_AFTER_METHODDEF
#define _SRE_SRE_PATTERN__FAIL_AFTER_METHODDEF
#endif /* !defined(_SRE_SRE_PATTERN__FAIL_AFTER_METHODDEF) */
/*[clinic end generated code: output=3654103c87eb4830 input=a9049054013a1b77]*/
/*[clinic end generated code: output=45baae8bdfafdc51 input=a9049054013a1b77]*/

View file

@ -1482,8 +1482,8 @@ _sre.SRE_Pattern.__deepcopy__
[clinic start generated code]*/
static PyObject *
_sre_SRE_Pattern___deepcopy__(PatternObject *self, PyObject *memo)
/*[clinic end generated code: output=2ad25679c1f1204a input=a465b1602f997bed]*/
_sre_SRE_Pattern___deepcopy___impl(PatternObject *self, PyObject *memo)
/*[clinic end generated code: output=75efe69bd12c5d7d input=a465b1602f997bed]*/
{
return Py_NewRef(self);
}
@ -2659,8 +2659,8 @@ _sre.SRE_Match.__deepcopy__
[clinic start generated code]*/
static PyObject *
_sre_SRE_Match___deepcopy__(MatchObject *self, PyObject *memo)
/*[clinic end generated code: output=ba7cb46d655e4ee2 input=779d12a31c2c325e]*/
_sre_SRE_Match___deepcopy___impl(MatchObject *self, PyObject *memo)
/*[clinic end generated code: output=2b657578eb03f4a3 input=779d12a31c2c325e]*/
{
return Py_NewRef(self);
}

View file

@ -2131,8 +2131,8 @@ Requires that the bytes length be a multiple of the struct size.
[clinic start generated code]*/
static PyObject *
Struct_iter_unpack(PyStructObject *self, PyObject *buffer)
/*[clinic end generated code: output=172d83d0cd15dbab input=6d65b3f3107dbc99]*/
Struct_iter_unpack_impl(PyStructObject *self, PyObject *buffer)
/*[clinic end generated code: output=818f89ad4afa8d64 input=6d65b3f3107dbc99]*/
{
_structmodulestate *state = get_struct_state_structinst(self);
unpackiterobject *iter;
@ -2691,7 +2691,7 @@ iter_unpack_impl(PyObject *module, PyStructObject *s_object,
PyObject *buffer)
/*[clinic end generated code: output=0ae50e250d20e74d input=b214a58869a3c98d]*/
{
return Struct_iter_unpack(s_object, buffer);
return Struct_iter_unpack((PyObject*)s_object, buffer);
}
static struct PyMethodDef module_functions[] = {

View file

@ -2010,8 +2010,8 @@ _tkinter.tkapp.getint
[clinic start generated code]*/
static PyObject *
_tkinter_tkapp_getint(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=88cf293fae307cfe input=034026997c5b91f8]*/
_tkinter_tkapp_getint_impl(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=5f75d31b260d4086 input=034026997c5b91f8]*/
{
char *s;
Tcl_Obj *value;
@ -2055,8 +2055,8 @@ _tkinter.tkapp.getdouble
[clinic start generated code]*/
static PyObject *
_tkinter_tkapp_getdouble(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=c52b138bd8b956b9 input=22015729ce9ef7f8]*/
_tkinter_tkapp_getdouble_impl(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=432433f2f52b09b6 input=22015729ce9ef7f8]*/
{
char *s;
double v;
@ -2094,8 +2094,8 @@ _tkinter.tkapp.getboolean
[clinic start generated code]*/
static PyObject *
_tkinter_tkapp_getboolean(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=726a9ae445821d91 input=7f11248ef8f8776e]*/
_tkinter_tkapp_getboolean_impl(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=3b05597cf2bfbd9f input=7f11248ef8f8776e]*/
{
char *s;
int v;
@ -2258,8 +2258,8 @@ _tkinter.tkapp.splitlist
[clinic start generated code]*/
static PyObject *
_tkinter_tkapp_splitlist(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=13b51d34386d36fb input=2b2e13351e3c0b53]*/
_tkinter_tkapp_splitlist_impl(TkappObject *self, PyObject *arg)
/*[clinic end generated code: output=e517f462159c3000 input=2b2e13351e3c0b53]*/
{
char *list;
Tcl_Size argc, i;
@ -2676,8 +2676,8 @@ _tkinter.tkapp.deletefilehandler
[clinic start generated code]*/
static PyObject *
_tkinter_tkapp_deletefilehandler(TkappObject *self, PyObject *file)
/*[clinic end generated code: output=b53cc96ebf9476fd input=abbec19d66312e2a]*/
_tkinter_tkapp_deletefilehandler_impl(TkappObject *self, PyObject *file)
/*[clinic end generated code: output=30b2c6ed195b0410 input=abbec19d66312e2a]*/
{
int tfile;
@ -3010,8 +3010,8 @@ Set the tracing function.
[clinic start generated code]*/
static PyObject *
_tkinter_tkapp_settrace(TkappObject *self, PyObject *func)
/*[clinic end generated code: output=847f6ebdf46e84fa input=31b260d46d3d018a]*/
_tkinter_tkapp_settrace_impl(TkappObject *self, PyObject *func)
/*[clinic end generated code: output=8c59938bc9005607 input=31b260d46d3d018a]*/
{
if (func == Py_None) {
func = NULL;

View file

@ -929,8 +929,8 @@ Return a copy of the array.
[clinic start generated code]*/
static PyObject *
array_array___deepcopy__(arrayobject *self, PyObject *unused)
/*[clinic end generated code: output=1ec748d8e14a9faa input=2405ecb4933748c4]*/
array_array___deepcopy___impl(arrayobject *self, PyObject *unused)
/*[clinic end generated code: output=703b4c412feaaf31 input=2405ecb4933748c4]*/
{
return array_array___copy___impl(self);
}
@ -1174,8 +1174,8 @@ Return number of occurrences of v in the array.
[clinic start generated code]*/
static PyObject *
array_array_count(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=3dd3624bf7135a3a input=d9bce9d65e39d1f5]*/
array_array_count_impl(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=93ead26a2affb739 input=d9bce9d65e39d1f5]*/
{
Py_ssize_t count = 0;
Py_ssize_t i;
@ -1272,8 +1272,8 @@ Remove the first occurrence of v in the array.
[clinic start generated code]*/
static PyObject *
array_array_remove(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=bef06be9fdf9dceb input=0b1e5aed25590027]*/
array_array_remove_impl(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=f2a24e288ecb2a35 input=0b1e5aed25590027]*/
{
Py_ssize_t i;
@ -1420,8 +1420,8 @@ Append new value v to the end of the array.
[clinic start generated code]*/
static PyObject *
array_array_append(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=745a0669bf8db0e2 input=0b98d9d78e78f0fa]*/
array_array_append_impl(arrayobject *self, PyObject *v)
/*[clinic end generated code: output=2f1e8cbad70c2a8b input=0b98d9d78e78f0fa]*/
{
return ins(self, Py_SIZE(self), v);
}
@ -1642,8 +1642,8 @@ Append items to array from list.
[clinic start generated code]*/
static PyObject *
array_array_fromlist(arrayobject *self, PyObject *list)
/*[clinic end generated code: output=26411c2d228a3e3f input=be2605a96c49680f]*/
array_array_fromlist_impl(arrayobject *self, PyObject *list)
/*[clinic end generated code: output=6c23733a68dd68df input=be2605a96c49680f]*/
{
Py_ssize_t n;
@ -3102,8 +3102,8 @@ Set state information for unpickling.
[clinic start generated code]*/
static PyObject *
array_arrayiterator___setstate__(arrayiterobject *self, PyObject *state)
/*[clinic end generated code: output=397da9904e443cbe input=f47d5ceda19e787b]*/
array_arrayiterator___setstate___impl(arrayiterobject *self, PyObject *state)
/*[clinic end generated code: output=d7837ae4ac1fd8b9 input=f47d5ceda19e787b]*/
{
Py_ssize_t index = PyLong_AsSsize_t(state);
if (index == -1 && PyErr_Occurred())

View file

@ -739,8 +739,8 @@ Update this hash object's state with the provided bytes-like object.
[clinic start generated code]*/
static PyObject *
_blake2_blake2b_update(Blake2Object *self, PyObject *data)
/*[clinic end generated code: output=e6d1ac88471df308 input=ffc4aa6a6a225d31]*/
_blake2_blake2b_update_impl(Blake2Object *self, PyObject *data)
/*[clinic end generated code: output=99330230068e8c99 input=ffc4aa6a6a225d31]*/
{
Py_buffer buf;

View file

@ -1403,6 +1403,19 @@ PyDoc_STRVAR(_asyncio_Task_set_result__doc__,
#define _ASYNCIO_TASK_SET_RESULT_METHODDEF \
{"set_result", (PyCFunction)_asyncio_Task_set_result, METH_O, _asyncio_Task_set_result__doc__},
static PyObject *
_asyncio_Task_set_result_impl(TaskObj *self, PyObject *result);
static PyObject *
_asyncio_Task_set_result(PyObject *self, PyObject *result)
{
PyObject *return_value = NULL;
return_value = _asyncio_Task_set_result_impl((TaskObj *)self, result);
return return_value;
}
PyDoc_STRVAR(_asyncio_Task_set_exception__doc__,
"set_exception($self, exception, /)\n"
"--\n"
@ -1411,6 +1424,19 @@ PyDoc_STRVAR(_asyncio_Task_set_exception__doc__,
#define _ASYNCIO_TASK_SET_EXCEPTION_METHODDEF \
{"set_exception", (PyCFunction)_asyncio_Task_set_exception, METH_O, _asyncio_Task_set_exception__doc__},
static PyObject *
_asyncio_Task_set_exception_impl(TaskObj *self, PyObject *exception);
static PyObject *
_asyncio_Task_set_exception(PyObject *self, PyObject *exception)
{
PyObject *return_value = NULL;
return_value = _asyncio_Task_set_exception_impl((TaskObj *)self, exception);
return return_value;
}
PyDoc_STRVAR(_asyncio_Task_get_coro__doc__,
"get_coro($self, /)\n"
"--\n"
@ -1486,7 +1512,7 @@ static PyObject *
_asyncio_Task_set_name_impl(TaskObj *self, PyObject *value);
static PyObject *
_asyncio_Task_set_name(TaskObj *self, PyObject *value)
_asyncio_Task_set_name(PyObject *self, PyObject *value)
{
PyObject *return_value = NULL;
@ -2174,4 +2200,4 @@ _asyncio_future_discard_from_awaited_by(PyObject *module, PyObject *const *args,
exit:
return return_value;
}
/*[clinic end generated code: output=f14ff14c29c691ec input=a9049054013a1b77]*/
/*[clinic end generated code: output=b1060b180d9dd54c input=a9049054013a1b77]*/

View file

@ -71,7 +71,7 @@ static PyObject *
deque_append_impl(dequeobject *deque, PyObject *item);
static PyObject *
deque_append(dequeobject *deque, PyObject *item)
deque_append(PyObject *deque, PyObject *item)
{
PyObject *return_value = NULL;
@ -95,7 +95,7 @@ static PyObject *
deque_appendleft_impl(dequeobject *deque, PyObject *item);
static PyObject *
deque_appendleft(dequeobject *deque, PyObject *item)
deque_appendleft(PyObject *deque, PyObject *item)
{
PyObject *return_value = NULL;
@ -119,7 +119,7 @@ static PyObject *
deque_extend_impl(dequeobject *deque, PyObject *iterable);
static PyObject *
deque_extend(dequeobject *deque, PyObject *iterable)
deque_extend(PyObject *deque, PyObject *iterable)
{
PyObject *return_value = NULL;
@ -143,7 +143,7 @@ static PyObject *
deque_extendleft_impl(dequeobject *deque, PyObject *iterable);
static PyObject *
deque_extendleft(dequeobject *deque, PyObject *iterable)
deque_extendleft(PyObject *deque, PyObject *iterable)
{
PyObject *return_value = NULL;
@ -308,7 +308,7 @@ static PyObject *
deque_count_impl(dequeobject *deque, PyObject *v);
static PyObject *
deque_count(dequeobject *deque, PyObject *v)
deque_count(PyObject *deque, PyObject *v)
{
PyObject *return_value = NULL;
@ -423,7 +423,7 @@ static PyObject *
deque_remove_impl(dequeobject *deque, PyObject *value);
static PyObject *
deque_remove(dequeobject *deque, PyObject *value)
deque_remove(PyObject *deque, PyObject *value)
{
PyObject *return_value = NULL;
@ -630,4 +630,4 @@ tuplegetter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
/*[clinic end generated code: output=2d89c39288fc7389 input=a9049054013a1b77]*/
/*[clinic end generated code: output=1eb3634d5ef8b407 input=a9049054013a1b77]*/

View file

@ -1479,6 +1479,19 @@ PyDoc_STRVAR(_curses_window_putwin__doc__,
#define _CURSES_WINDOW_PUTWIN_METHODDEF \
{"putwin", (PyCFunction)_curses_window_putwin, METH_O, _curses_window_putwin__doc__},
static PyObject *
_curses_window_putwin_impl(PyCursesWindowObject *self, PyObject *file);
static PyObject *
_curses_window_putwin(PyObject *self, PyObject *file)
{
PyObject *return_value = NULL;
return_value = _curses_window_putwin_impl((PyCursesWindowObject *)self, file);
return return_value;
}
PyDoc_STRVAR(_curses_window_redrawln__doc__,
"redrawln($self, beg, num, /)\n"
"--\n"
@ -4379,4 +4392,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored
#ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF
#define _CURSES_USE_DEFAULT_COLORS_METHODDEF
#endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */
/*[clinic end generated code: output=c4211865ed96c2af input=a9049054013a1b77]*/
/*[clinic end generated code: output=ce2d19df9e20bfa3 input=a9049054013a1b77]*/

View file

@ -984,6 +984,19 @@ PyDoc_STRVAR(_elementtree_TreeBuilder_data__doc__,
#define _ELEMENTTREE_TREEBUILDER_DATA_METHODDEF \
{"data", (PyCFunction)_elementtree_TreeBuilder_data, METH_O, _elementtree_TreeBuilder_data__doc__},
static PyObject *
_elementtree_TreeBuilder_data_impl(TreeBuilderObject *self, PyObject *data);
static PyObject *
_elementtree_TreeBuilder_data(PyObject *self, PyObject *data)
{
PyObject *return_value = NULL;
return_value = _elementtree_TreeBuilder_data_impl((TreeBuilderObject *)self, data);
return return_value;
}
PyDoc_STRVAR(_elementtree_TreeBuilder_end__doc__,
"end($self, tag, /)\n"
"--\n"
@ -992,6 +1005,19 @@ PyDoc_STRVAR(_elementtree_TreeBuilder_end__doc__,
#define _ELEMENTTREE_TREEBUILDER_END_METHODDEF \
{"end", (PyCFunction)_elementtree_TreeBuilder_end, METH_O, _elementtree_TreeBuilder_end__doc__},
static PyObject *
_elementtree_TreeBuilder_end_impl(TreeBuilderObject *self, PyObject *tag);
static PyObject *
_elementtree_TreeBuilder_end(PyObject *self, PyObject *tag)
{
PyObject *return_value = NULL;
return_value = _elementtree_TreeBuilder_end_impl((TreeBuilderObject *)self, tag);
return return_value;
}
PyDoc_STRVAR(_elementtree_TreeBuilder_comment__doc__,
"comment($self, text, /)\n"
"--\n"
@ -1000,6 +1026,20 @@ PyDoc_STRVAR(_elementtree_TreeBuilder_comment__doc__,
#define _ELEMENTTREE_TREEBUILDER_COMMENT_METHODDEF \
{"comment", (PyCFunction)_elementtree_TreeBuilder_comment, METH_O, _elementtree_TreeBuilder_comment__doc__},
static PyObject *
_elementtree_TreeBuilder_comment_impl(TreeBuilderObject *self,
PyObject *text);
static PyObject *
_elementtree_TreeBuilder_comment(PyObject *self, PyObject *text)
{
PyObject *return_value = NULL;
return_value = _elementtree_TreeBuilder_comment_impl((TreeBuilderObject *)self, text);
return return_value;
}
PyDoc_STRVAR(_elementtree_TreeBuilder_pi__doc__,
"pi($self, target, text=None, /)\n"
"--\n"
@ -1206,6 +1246,19 @@ PyDoc_STRVAR(_elementtree_XMLParser_feed__doc__,
#define _ELEMENTTREE_XMLPARSER_FEED_METHODDEF \
{"feed", (PyCFunction)_elementtree_XMLParser_feed, METH_O, _elementtree_XMLParser_feed__doc__},
static PyObject *
_elementtree_XMLParser_feed_impl(XMLParserObject *self, PyObject *data);
static PyObject *
_elementtree_XMLParser_feed(PyObject *self, PyObject *data)
{
PyObject *return_value = NULL;
return_value = _elementtree_XMLParser_feed_impl((XMLParserObject *)self, data);
return return_value;
}
PyDoc_STRVAR(_elementtree_XMLParser__parse_whole__doc__,
"_parse_whole($self, file, /)\n"
"--\n"
@ -1214,6 +1267,20 @@ PyDoc_STRVAR(_elementtree_XMLParser__parse_whole__doc__,
#define _ELEMENTTREE_XMLPARSER__PARSE_WHOLE_METHODDEF \
{"_parse_whole", (PyCFunction)_elementtree_XMLParser__parse_whole, METH_O, _elementtree_XMLParser__parse_whole__doc__},
static PyObject *
_elementtree_XMLParser__parse_whole_impl(XMLParserObject *self,
PyObject *file);
static PyObject *
_elementtree_XMLParser__parse_whole(PyObject *self, PyObject *file)
{
PyObject *return_value = NULL;
return_value = _elementtree_XMLParser__parse_whole_impl((XMLParserObject *)self, file);
return return_value;
}
PyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__,
"_setevents($self, events_queue, events_to_report=None, /)\n"
"--\n"
@ -1248,4 +1315,4 @@ skip_optional:
exit:
return return_value;
}
/*[clinic end generated code: output=e5c758958f14f102 input=a9049054013a1b77]*/
/*[clinic end generated code: output=0eed58350c3c1832 input=a9049054013a1b77]*/

View file

@ -72,6 +72,19 @@ PyDoc_STRVAR(EVP_update__doc__,
#define EVP_UPDATE_METHODDEF \
{"update", (PyCFunction)EVP_update, METH_O, EVP_update__doc__},
static PyObject *
EVP_update_impl(EVPobject *self, PyObject *obj);
static PyObject *
EVP_update(PyObject *self, PyObject *obj)
{
PyObject *return_value = NULL;
return_value = EVP_update_impl((EVPobject *)self, obj);
return return_value;
}
#if defined(PY_OPENSSL_HAS_SHAKE)
PyDoc_STRVAR(EVPXOF_digest__doc__,
@ -1844,4 +1857,4 @@ exit:
#ifndef _HASHLIB_SCRYPT_METHODDEF
#define _HASHLIB_SCRYPT_METHODDEF
#endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */
/*[clinic end generated code: output=811a8b50beae1018 input=a9049054013a1b77]*/
/*[clinic end generated code: output=e9624853a73bb65a input=a9049054013a1b77]*/

View file

@ -103,7 +103,7 @@ static PyObject *
_random_Random_setstate_impl(RandomObject *self, PyObject *state);
static PyObject *
_random_Random_setstate(RandomObject *self, PyObject *state)
_random_Random_setstate(PyObject *self, PyObject *state)
{
PyObject *return_value = NULL;
@ -143,4 +143,4 @@ _random_Random_getrandbits(PyObject *self, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=859cfbf59c133a4e input=a9049054013a1b77]*/
/*[clinic end generated code: output=4458b5a69201ebea input=a9049054013a1b77]*/

View file

@ -1520,7 +1520,7 @@ static PyObject *
_ssl__SSLContext_load_dh_params_impl(PySSLContext *self, PyObject *filepath);
static PyObject *
_ssl__SSLContext_load_dh_params(PySSLContext *self, PyObject *filepath)
_ssl__SSLContext_load_dh_params(PyObject *self, PyObject *filepath)
{
PyObject *return_value = NULL;
@ -1784,7 +1784,7 @@ static PyObject *
_ssl__SSLContext_set_ecdh_curve_impl(PySSLContext *self, PyObject *name);
static PyObject *
_ssl__SSLContext_set_ecdh_curve(PySSLContext *self, PyObject *name)
_ssl__SSLContext_set_ecdh_curve(PyObject *self, PyObject *name)
{
PyObject *return_value = NULL;
@ -2878,4 +2878,4 @@ exit:
#ifndef _SSL_ENUM_CRLS_METHODDEF
#define _SSL_ENUM_CRLS_METHODDEF
#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
/*[clinic end generated code: output=bededfb2b927bd41 input=a9049054013a1b77]*/
/*[clinic end generated code: output=c402c53dc30a14fa input=a9049054013a1b77]*/

View file

@ -209,6 +209,19 @@ PyDoc_STRVAR(Struct_iter_unpack__doc__,
#define STRUCT_ITER_UNPACK_METHODDEF \
{"iter_unpack", (PyCFunction)Struct_iter_unpack, METH_O, Struct_iter_unpack__doc__},
static PyObject *
Struct_iter_unpack_impl(PyStructObject *self, PyObject *buffer);
static PyObject *
Struct_iter_unpack(PyObject *self, PyObject *buffer)
{
PyObject *return_value = NULL;
return_value = Struct_iter_unpack_impl((PyStructObject *)self, buffer);
return return_value;
}
PyDoc_STRVAR(_clearcache__doc__,
"_clearcache($module, /)\n"
"--\n"
@ -439,4 +452,4 @@ exit:
return return_value;
}
/*[clinic end generated code: output=ec540c21be08e1d0 input=a9049054013a1b77]*/
/*[clinic end generated code: output=c7c051850b7ad427 input=a9049054013a1b77]*/

View file

@ -156,6 +156,19 @@ PyDoc_STRVAR(_tkinter_tkapp_getint__doc__,
#define _TKINTER_TKAPP_GETINT_METHODDEF \
{"getint", (PyCFunction)_tkinter_tkapp_getint, METH_O, _tkinter_tkapp_getint__doc__},
static PyObject *
_tkinter_tkapp_getint_impl(TkappObject *self, PyObject *arg);
static PyObject *
_tkinter_tkapp_getint(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = _tkinter_tkapp_getint_impl((TkappObject *)self, arg);
return return_value;
}
PyDoc_STRVAR(_tkinter_tkapp_getdouble__doc__,
"getdouble($self, arg, /)\n"
"--\n"
@ -164,6 +177,19 @@ PyDoc_STRVAR(_tkinter_tkapp_getdouble__doc__,
#define _TKINTER_TKAPP_GETDOUBLE_METHODDEF \
{"getdouble", (PyCFunction)_tkinter_tkapp_getdouble, METH_O, _tkinter_tkapp_getdouble__doc__},
static PyObject *
_tkinter_tkapp_getdouble_impl(TkappObject *self, PyObject *arg);
static PyObject *
_tkinter_tkapp_getdouble(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = _tkinter_tkapp_getdouble_impl((TkappObject *)self, arg);
return return_value;
}
PyDoc_STRVAR(_tkinter_tkapp_getboolean__doc__,
"getboolean($self, arg, /)\n"
"--\n"
@ -172,6 +198,19 @@ PyDoc_STRVAR(_tkinter_tkapp_getboolean__doc__,
#define _TKINTER_TKAPP_GETBOOLEAN_METHODDEF \
{"getboolean", (PyCFunction)_tkinter_tkapp_getboolean, METH_O, _tkinter_tkapp_getboolean__doc__},
static PyObject *
_tkinter_tkapp_getboolean_impl(TkappObject *self, PyObject *arg);
static PyObject *
_tkinter_tkapp_getboolean(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = _tkinter_tkapp_getboolean_impl((TkappObject *)self, arg);
return return_value;
}
PyDoc_STRVAR(_tkinter_tkapp_exprstring__doc__,
"exprstring($self, s, /)\n"
"--\n"
@ -324,6 +363,19 @@ PyDoc_STRVAR(_tkinter_tkapp_splitlist__doc__,
#define _TKINTER_TKAPP_SPLITLIST_METHODDEF \
{"splitlist", (PyCFunction)_tkinter_tkapp_splitlist, METH_O, _tkinter_tkapp_splitlist__doc__},
static PyObject *
_tkinter_tkapp_splitlist_impl(TkappObject *self, PyObject *arg);
static PyObject *
_tkinter_tkapp_splitlist(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = _tkinter_tkapp_splitlist_impl((TkappObject *)self, arg);
return return_value;
}
PyDoc_STRVAR(_tkinter_tkapp_createcommand__doc__,
"createcommand($self, name, func, /)\n"
"--\n"
@ -451,6 +503,19 @@ PyDoc_STRVAR(_tkinter_tkapp_deletefilehandler__doc__,
#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF \
{"deletefilehandler", (PyCFunction)_tkinter_tkapp_deletefilehandler, METH_O, _tkinter_tkapp_deletefilehandler__doc__},
static PyObject *
_tkinter_tkapp_deletefilehandler_impl(TkappObject *self, PyObject *file);
static PyObject *
_tkinter_tkapp_deletefilehandler(PyObject *self, PyObject *file)
{
PyObject *return_value = NULL;
return_value = _tkinter_tkapp_deletefilehandler_impl((TkappObject *)self, file);
return return_value;
}
#endif /* defined(HAVE_CREATEFILEHANDLER) */
PyDoc_STRVAR(_tkinter_tktimertoken_deletetimerhandler__doc__,
@ -631,6 +696,19 @@ PyDoc_STRVAR(_tkinter_tkapp_settrace__doc__,
#define _TKINTER_TKAPP_SETTRACE_METHODDEF \
{"settrace", (PyCFunction)_tkinter_tkapp_settrace, METH_O, _tkinter_tkapp_settrace__doc__},
static PyObject *
_tkinter_tkapp_settrace_impl(TkappObject *self, PyObject *func);
static PyObject *
_tkinter_tkapp_settrace(PyObject *self, PyObject *func)
{
PyObject *return_value = NULL;
return_value = _tkinter_tkapp_settrace_impl((TkappObject *)self, func);
return return_value;
}
PyDoc_STRVAR(_tkinter_tkapp_gettrace__doc__,
"gettrace($self, /)\n"
"--\n"
@ -888,4 +966,4 @@ exit:
#ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
/*[clinic end generated code: output=172a98df5f209a84 input=a9049054013a1b77]*/
/*[clinic end generated code: output=052c067aa69237be input=a9049054013a1b77]*/

View file

@ -53,6 +53,19 @@ PyDoc_STRVAR(array_array___deepcopy____doc__,
#define ARRAY_ARRAY___DEEPCOPY___METHODDEF \
{"__deepcopy__", (PyCFunction)array_array___deepcopy__, METH_O, array_array___deepcopy____doc__},
static PyObject *
array_array___deepcopy___impl(arrayobject *self, PyObject *unused);
static PyObject *
array_array___deepcopy__(PyObject *self, PyObject *unused)
{
PyObject *return_value = NULL;
return_value = array_array___deepcopy___impl((arrayobject *)self, unused);
return return_value;
}
PyDoc_STRVAR(array_array_count__doc__,
"count($self, v, /)\n"
"--\n"
@ -62,6 +75,19 @@ PyDoc_STRVAR(array_array_count__doc__,
#define ARRAY_ARRAY_COUNT_METHODDEF \
{"count", (PyCFunction)array_array_count, METH_O, array_array_count__doc__},
static PyObject *
array_array_count_impl(arrayobject *self, PyObject *v);
static PyObject *
array_array_count(PyObject *self, PyObject *v)
{
PyObject *return_value = NULL;
return_value = array_array_count_impl((arrayobject *)self, v);
return return_value;
}
PyDoc_STRVAR(array_array_index__doc__,
"index($self, v, start=0, stop=sys.maxsize, /)\n"
"--\n"
@ -117,6 +143,19 @@ PyDoc_STRVAR(array_array_remove__doc__,
#define ARRAY_ARRAY_REMOVE_METHODDEF \
{"remove", (PyCFunction)array_array_remove, METH_O, array_array_remove__doc__},
static PyObject *
array_array_remove_impl(arrayobject *self, PyObject *v);
static PyObject *
array_array_remove(PyObject *self, PyObject *v)
{
PyObject *return_value = NULL;
return_value = array_array_remove_impl((arrayobject *)self, v);
return return_value;
}
PyDoc_STRVAR(array_array_pop__doc__,
"pop($self, i=-1, /)\n"
"--\n"
@ -277,6 +316,19 @@ PyDoc_STRVAR(array_array_append__doc__,
#define ARRAY_ARRAY_APPEND_METHODDEF \
{"append", (PyCFunction)array_array_append, METH_O, array_array_append__doc__},
static PyObject *
array_array_append_impl(arrayobject *self, PyObject *v);
static PyObject *
array_array_append(PyObject *self, PyObject *v)
{
PyObject *return_value = NULL;
return_value = array_array_append_impl((arrayobject *)self, v);
return return_value;
}
PyDoc_STRVAR(array_array_byteswap__doc__,
"byteswap($self, /)\n"
"--\n"
@ -427,6 +479,19 @@ PyDoc_STRVAR(array_array_fromlist__doc__,
#define ARRAY_ARRAY_FROMLIST_METHODDEF \
{"fromlist", (PyCFunction)array_array_fromlist, METH_O, array_array_fromlist__doc__},
static PyObject *
array_array_fromlist_impl(arrayobject *self, PyObject *list);
static PyObject *
array_array_fromlist(PyObject *self, PyObject *list)
{
PyObject *return_value = NULL;
return_value = array_array_fromlist_impl((arrayobject *)self, list);
return return_value;
}
PyDoc_STRVAR(array_array_tolist__doc__,
"tolist($self, /)\n"
"--\n"
@ -695,4 +760,17 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
/*[clinic end generated code: output=8120dc5c4fa414b9 input=a9049054013a1b77]*/
static PyObject *
array_arrayiterator___setstate___impl(arrayiterobject *self, PyObject *state);
static PyObject *
array_arrayiterator___setstate__(PyObject *self, PyObject *state)
{
PyObject *return_value = NULL;
return_value = array_arrayiterator___setstate___impl((arrayiterobject *)self, state);
return return_value;
}
/*[clinic end generated code: output=dd49451ac1cc3f39 input=a9049054013a1b77]*/

View file

@ -426,6 +426,19 @@ PyDoc_STRVAR(_blake2_blake2b_update__doc__,
#define _BLAKE2_BLAKE2B_UPDATE_METHODDEF \
{"update", (PyCFunction)_blake2_blake2b_update, METH_O, _blake2_blake2b_update__doc__},
static PyObject *
_blake2_blake2b_update_impl(Blake2Object *self, PyObject *data);
static PyObject *
_blake2_blake2b_update(PyObject *self, PyObject *data)
{
PyObject *return_value = NULL;
return_value = _blake2_blake2b_update_impl((Blake2Object *)self, data);
return return_value;
}
PyDoc_STRVAR(_blake2_blake2b_digest__doc__,
"digest($self, /)\n"
"--\n"
@ -461,4 +474,4 @@ _blake2_blake2b_hexdigest(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return _blake2_blake2b_hexdigest_impl((Blake2Object *)self);
}
/*[clinic end generated code: output=6e03c947b7e0d973 input=a9049054013a1b77]*/
/*[clinic end generated code: output=b286a0d1be8729b0 input=a9049054013a1b77]*/

View file

@ -75,6 +75,19 @@ PyDoc_STRVAR(MD5Type_update__doc__,
#define MD5TYPE_UPDATE_METHODDEF \
{"update", (PyCFunction)MD5Type_update, METH_O, MD5Type_update__doc__},
static PyObject *
MD5Type_update_impl(MD5object *self, PyObject *obj);
static PyObject *
MD5Type_update(PyObject *self, PyObject *obj)
{
PyObject *return_value = NULL;
return_value = MD5Type_update_impl((MD5object *)self, obj);
return return_value;
}
PyDoc_STRVAR(_md5_md5__doc__,
"md5($module, /, string=b\'\', *, usedforsecurity=True)\n"
"--\n"
@ -149,4 +162,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
/*[clinic end generated code: output=a4292eab710dcb60 input=a9049054013a1b77]*/
/*[clinic end generated code: output=10db0ff2ecf97159 input=a9049054013a1b77]*/

View file

@ -75,6 +75,19 @@ PyDoc_STRVAR(SHA1Type_update__doc__,
#define SHA1TYPE_UPDATE_METHODDEF \
{"update", (PyCFunction)SHA1Type_update, METH_O, SHA1Type_update__doc__},
static PyObject *
SHA1Type_update_impl(SHA1object *self, PyObject *obj);
static PyObject *
SHA1Type_update(PyObject *self, PyObject *obj)
{
PyObject *return_value = NULL;
return_value = SHA1Type_update_impl((SHA1object *)self, obj);
return return_value;
}
PyDoc_STRVAR(_sha1_sha1__doc__,
"sha1($module, /, string=b\'\', *, usedforsecurity=True)\n"
"--\n"
@ -149,4 +162,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
/*[clinic end generated code: output=ad6f3788a6e7ff6f input=a9049054013a1b77]*/
/*[clinic end generated code: output=3cfa7b6a9f99b5b2 input=a9049054013a1b77]*/

View file

@ -133,6 +133,19 @@ PyDoc_STRVAR(SHA256Type_update__doc__,
#define SHA256TYPE_UPDATE_METHODDEF \
{"update", (PyCFunction)SHA256Type_update, METH_O, SHA256Type_update__doc__},
static PyObject *
SHA256Type_update_impl(SHA256object *self, PyObject *obj);
static PyObject *
SHA256Type_update(PyObject *self, PyObject *obj)
{
PyObject *return_value = NULL;
return_value = SHA256Type_update_impl((SHA256object *)self, obj);
return return_value;
}
PyDoc_STRVAR(SHA512Type_update__doc__,
"update($self, obj, /)\n"
"--\n"
@ -142,6 +155,19 @@ PyDoc_STRVAR(SHA512Type_update__doc__,
#define SHA512TYPE_UPDATE_METHODDEF \
{"update", (PyCFunction)SHA512Type_update, METH_O, SHA512Type_update__doc__},
static PyObject *
SHA512Type_update_impl(SHA512object *self, PyObject *obj);
static PyObject *
SHA512Type_update(PyObject *self, PyObject *obj)
{
PyObject *return_value = NULL;
return_value = SHA512Type_update_impl((SHA512object *)self, obj);
return return_value;
}
PyDoc_STRVAR(_sha2_sha256__doc__,
"sha256($module, /, string=b\'\', *, usedforsecurity=True)\n"
"--\n"
@ -441,4 +467,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
/*[clinic end generated code: output=1d7fec114eb6b6e3 input=a9049054013a1b77]*/
/*[clinic end generated code: output=0c2eed5c77ec6987 input=a9049054013a1b77]*/

View file

@ -142,6 +142,19 @@ PyDoc_STRVAR(_sha3_sha3_224_update__doc__,
#define _SHA3_SHA3_224_UPDATE_METHODDEF \
{"update", (PyCFunction)_sha3_sha3_224_update, METH_O, _sha3_sha3_224_update__doc__},
static PyObject *
_sha3_sha3_224_update_impl(SHA3object *self, PyObject *data);
static PyObject *
_sha3_sha3_224_update(PyObject *self, PyObject *data)
{
PyObject *return_value = NULL;
return_value = _sha3_sha3_224_update_impl((SHA3object *)self, data);
return return_value;
}
PyDoc_STRVAR(_sha3_shake_128_digest__doc__,
"digest($self, length, /)\n"
"--\n"
@ -195,4 +208,4 @@ _sha3_shake_128_hexdigest(PyObject *self, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=21da06d9570969d8 input=a9049054013a1b77]*/
/*[clinic end generated code: output=437023d9eac08551 input=a9049054013a1b77]*/

View file

@ -194,8 +194,8 @@ Update this hash object's state with the provided string.
[clinic start generated code]*/
static PyObject *
MD5Type_update(MD5object *self, PyObject *obj)
/*[clinic end generated code: output=f6ad168416338423 input=6e1efcd9ecf17032]*/
MD5Type_update_impl(MD5object *self, PyObject *obj)
/*[clinic end generated code: output=b0fed9a7ce7ad253 input=6e1efcd9ecf17032]*/
{
Py_buffer buf;

View file

@ -187,8 +187,8 @@ Update this hash object's state with the provided string.
[clinic start generated code]*/
static PyObject *
SHA1Type_update(SHA1object *self, PyObject *obj)
/*[clinic end generated code: output=d9902f0e5015e9ae input=aad8e07812edbba3]*/
SHA1Type_update_impl(SHA1object *self, PyObject *obj)
/*[clinic end generated code: output=cdc8e0e106dbec5f input=aad8e07812edbba3]*/
{
Py_buffer buf;

View file

@ -368,8 +368,8 @@ Update this hash object's state with the provided string.
[clinic start generated code]*/
static PyObject *
SHA256Type_update(SHA256object *self, PyObject *obj)
/*[clinic end generated code: output=1b240f965ddbd8c6 input=b2d449d5b30f0f5a]*/
SHA256Type_update_impl(SHA256object *self, PyObject *obj)
/*[clinic end generated code: output=dc58a580cf8905a5 input=b2d449d5b30f0f5a]*/
{
Py_buffer buf;
@ -402,8 +402,8 @@ Update this hash object's state with the provided string.
[clinic start generated code]*/
static PyObject *
SHA512Type_update(SHA512object *self, PyObject *obj)
/*[clinic end generated code: output=745f51057a985884 input=ded2b46656566283]*/
SHA512Type_update_impl(SHA512object *self, PyObject *obj)
/*[clinic end generated code: output=9af211766c0b7365 input=ded2b46656566283]*/
{
Py_buffer buf;

View file

@ -271,8 +271,8 @@ Update this hash object's state with the provided bytes-like object.
[clinic start generated code]*/
static PyObject *
_sha3_sha3_224_update(SHA3object *self, PyObject *data)
/*[clinic end generated code: output=d3223352286ed357 input=a887f54dcc4ae227]*/
_sha3_sha3_224_update_impl(SHA3object *self, PyObject *data)
/*[clinic end generated code: output=390b7abf7c9795a5 input=a887f54dcc4ae227]*/
{
Py_buffer buf;

View file

@ -1883,8 +1883,8 @@ Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.
[clinic start generated code]*/
static PyObject *
bytes_join(PyBytesObject *self, PyObject *iterable_of_bytes)
/*[clinic end generated code: output=a046f379f626f6f8 input=7fe377b95bd549d2]*/
bytes_join_impl(PyBytesObject *self, PyObject *iterable_of_bytes)
/*[clinic end generated code: output=0687abb94d7d438e input=7fe377b95bd549d2]*/
{
return stringlib_bytes_join((PyObject*)self, iterable_of_bytes);
}

View file

@ -929,7 +929,7 @@ static PyObject *
bytearray_partition_impl(PyByteArrayObject *self, PyObject *sep);
static PyObject *
bytearray_partition(PyByteArrayObject *self, PyObject *sep)
bytearray_partition(PyObject *self, PyObject *sep)
{
PyObject *return_value = NULL;
@ -961,7 +961,7 @@ static PyObject *
bytearray_rpartition_impl(PyByteArrayObject *self, PyObject *sep);
static PyObject *
bytearray_rpartition(PyByteArrayObject *self, PyObject *sep)
bytearray_rpartition(PyObject *self, PyObject *sep)
{
PyObject *return_value = NULL;
@ -1186,7 +1186,7 @@ static PyObject *
bytearray_extend_impl(PyByteArrayObject *self, PyObject *iterable_of_ints);
static PyObject *
bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints)
bytearray_extend(PyObject *self, PyObject *iterable_of_ints)
{
PyObject *return_value = NULL;
@ -1509,7 +1509,7 @@ static PyObject *
bytearray_join_impl(PyByteArrayObject *self, PyObject *iterable_of_bytes);
static PyObject *
bytearray_join(PyByteArrayObject *self, PyObject *iterable_of_bytes)
bytearray_join(PyObject *self, PyObject *iterable_of_bytes)
{
PyObject *return_value = NULL;
@ -1789,4 +1789,4 @@ bytearray_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return bytearray_sizeof_impl((PyByteArrayObject *)self);
}
/*[clinic end generated code: output=5e33422343b47af9 input=a9049054013a1b77]*/
/*[clinic end generated code: output=7c924a56e0a8bfe6 input=a9049054013a1b77]*/

View file

@ -296,6 +296,19 @@ PyDoc_STRVAR(bytes_join__doc__,
#define BYTES_JOIN_METHODDEF \
{"join", (PyCFunction)bytes_join, METH_O, bytes_join__doc__},
static PyObject *
bytes_join_impl(PyBytesObject *self, PyObject *iterable_of_bytes);
static PyObject *
bytes_join(PyObject *self, PyObject *iterable_of_bytes)
{
PyObject *return_value = NULL;
return_value = bytes_join_impl((PyBytesObject *)self, iterable_of_bytes);
return return_value;
}
PyDoc_STRVAR(bytes_find__doc__,
"find($self, sub[, start[, end]], /)\n"
"--\n"
@ -1391,4 +1404,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=96fe2d6ef9ac8f6a input=a9049054013a1b77]*/
/*[clinic end generated code: output=61cb2cf6506df4c6 input=a9049054013a1b77]*/

View file

@ -66,6 +66,19 @@ PyDoc_STRVAR(dict___contains____doc__,
#define DICT___CONTAINS___METHODDEF \
{"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
static PyObject *
dict___contains___impl(PyDictObject *self, PyObject *key);
static PyObject *
dict___contains__(PyObject *self, PyObject *key)
{
PyObject *return_value = NULL;
return_value = dict___contains___impl((PyDictObject *)self, key);
return return_value;
}
PyDoc_STRVAR(dict_get__doc__,
"get($self, key, default=None, /)\n"
"--\n"
@ -310,4 +323,4 @@ dict_values(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return dict_values_impl((PyDictObject *)self);
}
/*[clinic end generated code: output=0f04bf0e7e6b130f input=a9049054013a1b77]*/
/*[clinic end generated code: output=8a104741e4676c76 input=a9049054013a1b77]*/

View file

@ -40,7 +40,7 @@ static PyObject *
BaseException___setstate___impl(PyBaseExceptionObject *self, PyObject *state);
static PyObject *
BaseException___setstate__(PyBaseExceptionObject *self, PyObject *state)
BaseException___setstate__(PyObject *self, PyObject *state)
{
PyObject *return_value = NULL;
@ -64,7 +64,7 @@ static PyObject *
BaseException_with_traceback_impl(PyBaseExceptionObject *self, PyObject *tb);
static PyObject *
BaseException_with_traceback(PyBaseExceptionObject *self, PyObject *tb)
BaseException_with_traceback(PyObject *self, PyObject *tb)
{
PyObject *return_value = NULL;
@ -322,7 +322,7 @@ BaseExceptionGroup_derive_impl(PyBaseExceptionGroupObject *self,
PyObject *excs);
static PyObject *
BaseExceptionGroup_derive(PyBaseExceptionGroupObject *self, PyObject *excs)
BaseExceptionGroup_derive(PyObject *self, PyObject *excs)
{
PyObject *return_value = NULL;
@ -346,7 +346,7 @@ BaseExceptionGroup_split_impl(PyBaseExceptionGroupObject *self,
PyObject *matcher_value);
static PyObject *
BaseExceptionGroup_split(PyBaseExceptionGroupObject *self, PyObject *matcher_value)
BaseExceptionGroup_split(PyObject *self, PyObject *matcher_value)
{
PyObject *return_value = NULL;
@ -370,7 +370,7 @@ BaseExceptionGroup_subgroup_impl(PyBaseExceptionGroupObject *self,
PyObject *matcher_value);
static PyObject *
BaseExceptionGroup_subgroup(PyBaseExceptionGroupObject *self, PyObject *matcher_value)
BaseExceptionGroup_subgroup(PyObject *self, PyObject *matcher_value)
{
PyObject *return_value = NULL;
@ -380,4 +380,4 @@ BaseExceptionGroup_subgroup(PyBaseExceptionGroupObject *self, PyObject *matcher_
return return_value;
}
/*[clinic end generated code: output=19aed708dcaf7184 input=a9049054013a1b77]*/
/*[clinic end generated code: output=fcf70b3b71f3d14a input=a9049054013a1b77]*/

View file

@ -114,7 +114,7 @@ static PyObject *
list_append_impl(PyListObject *self, PyObject *object);
static PyObject *
list_append(PyListObject *self, PyObject *object)
list_append(PyObject *self, PyObject *object)
{
PyObject *return_value = NULL;
@ -134,6 +134,19 @@ PyDoc_STRVAR(list_extend__doc__,
#define LIST_EXTEND_METHODDEF \
{"extend", (PyCFunction)list_extend, METH_O, list_extend__doc__},
static PyObject *
list_extend_impl(PyListObject *self, PyObject *iterable);
static PyObject *
list_extend(PyObject *self, PyObject *iterable)
{
PyObject *return_value = NULL;
return_value = list_extend_impl((PyListObject *)self, iterable);
return return_value;
}
PyDoc_STRVAR(list_pop__doc__,
"pop($self, index=-1, /)\n"
"--\n"
@ -341,6 +354,19 @@ PyDoc_STRVAR(list_count__doc__,
#define LIST_COUNT_METHODDEF \
{"count", (PyCFunction)list_count, METH_O, list_count__doc__},
static PyObject *
list_count_impl(PyListObject *self, PyObject *value);
static PyObject *
list_count(PyObject *self, PyObject *value)
{
PyObject *return_value = NULL;
return_value = list_count_impl((PyListObject *)self, value);
return return_value;
}
PyDoc_STRVAR(list_remove__doc__,
"remove($self, value, /)\n"
"--\n"
@ -356,7 +382,7 @@ static PyObject *
list_remove_impl(PyListObject *self, PyObject *value);
static PyObject *
list_remove(PyListObject *self, PyObject *value)
list_remove(PyObject *self, PyObject *value)
{
PyObject *return_value = NULL;
@ -440,4 +466,4 @@ list___reversed__(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return list___reversed___impl((PyListObject *)self);
}
/*[clinic end generated code: output=35c43dc33f9ba521 input=a9049054013a1b77]*/
/*[clinic end generated code: output=bc45e43a621ac833 input=a9049054013a1b77]*/

View file

@ -428,6 +428,19 @@ PyDoc_STRVAR(memoryview_count__doc__,
#define MEMORYVIEW_COUNT_METHODDEF \
{"count", (PyCFunction)memoryview_count, METH_O, memoryview_count__doc__},
static PyObject *
memoryview_count_impl(PyMemoryViewObject *self, PyObject *value);
static PyObject *
memoryview_count(PyObject *self, PyObject *value)
{
PyObject *return_value = NULL;
return_value = memoryview_count_impl((PyMemoryViewObject *)self, value);
return return_value;
}
PyDoc_STRVAR(memoryview_index__doc__,
"index($self, value, start=0, stop=sys.maxsize, /)\n"
"--\n"
@ -473,4 +486,4 @@ skip_optional:
exit:
return return_value;
}
/*[clinic end generated code: output=2ef6c061d9c4e3dc input=a9049054013a1b77]*/
/*[clinic end generated code: output=c0371164b68a6839 input=a9049054013a1b77]*/

View file

@ -223,7 +223,7 @@ static PyObject *
set_isdisjoint_impl(PySetObject *so, PyObject *other);
static PyObject *
set_isdisjoint(PySetObject *so, PyObject *other)
set_isdisjoint(PyObject *so, PyObject *other)
{
PyObject *return_value = NULL;
@ -297,6 +297,19 @@ PyDoc_STRVAR(set_symmetric_difference_update__doc__,
#define SET_SYMMETRIC_DIFFERENCE_UPDATE_METHODDEF \
{"symmetric_difference_update", (PyCFunction)set_symmetric_difference_update, METH_O, set_symmetric_difference_update__doc__},
static PyObject *
set_symmetric_difference_update_impl(PySetObject *so, PyObject *other);
static PyObject *
set_symmetric_difference_update(PyObject *so, PyObject *other)
{
PyObject *return_value = NULL;
return_value = set_symmetric_difference_update_impl((PySetObject *)so, other);
return return_value;
}
PyDoc_STRVAR(set_symmetric_difference__doc__,
"symmetric_difference($self, other, /)\n"
"--\n"
@ -310,7 +323,7 @@ static PyObject *
set_symmetric_difference_impl(PySetObject *so, PyObject *other);
static PyObject *
set_symmetric_difference(PySetObject *so, PyObject *other)
set_symmetric_difference(PyObject *so, PyObject *other)
{
PyObject *return_value = NULL;
@ -334,7 +347,7 @@ static PyObject *
set_issubset_impl(PySetObject *so, PyObject *other);
static PyObject *
set_issubset(PySetObject *so, PyObject *other)
set_issubset(PyObject *so, PyObject *other)
{
PyObject *return_value = NULL;
@ -358,7 +371,7 @@ static PyObject *
set_issuperset_impl(PySetObject *so, PyObject *other);
static PyObject *
set_issuperset(PySetObject *so, PyObject *other)
set_issuperset(PyObject *so, PyObject *other)
{
PyObject *return_value = NULL;
@ -384,7 +397,7 @@ static PyObject *
set_add_impl(PySetObject *so, PyObject *key);
static PyObject *
set_add(PySetObject *so, PyObject *key)
set_add(PyObject *so, PyObject *key)
{
PyObject *return_value = NULL;
@ -408,7 +421,7 @@ static PyObject *
set___contains___impl(PySetObject *so, PyObject *key);
static PyObject *
set___contains__(PySetObject *so, PyObject *key)
set___contains__(PyObject *so, PyObject *key)
{
PyObject *return_value = NULL;
@ -434,7 +447,7 @@ static PyObject *
set_remove_impl(PySetObject *so, PyObject *key);
static PyObject *
set_remove(PySetObject *so, PyObject *key)
set_remove(PyObject *so, PyObject *key)
{
PyObject *return_value = NULL;
@ -461,7 +474,7 @@ static PyObject *
set_discard_impl(PySetObject *so, PyObject *key);
static PyObject *
set_discard(PySetObject *so, PyObject *key)
set_discard(PyObject *so, PyObject *key)
{
PyObject *return_value = NULL;
@ -519,4 +532,4 @@ set___sizeof__(PyObject *so, PyObject *Py_UNUSED(ignored))
return return_value;
}
/*[clinic end generated code: output=83b7742a762ce465 input=a9049054013a1b77]*/
/*[clinic end generated code: output=e2f1470de062d661 input=a9049054013a1b77]*/

View file

@ -59,6 +59,19 @@ PyDoc_STRVAR(tuple_count__doc__,
#define TUPLE_COUNT_METHODDEF \
{"count", (PyCFunction)tuple_count, METH_O, tuple_count__doc__},
static PyObject *
tuple_count_impl(PyTupleObject *self, PyObject *value);
static PyObject *
tuple_count(PyObject *self, PyObject *value)
{
PyObject *return_value = NULL;
return_value = tuple_count_impl((PyTupleObject *)self, value);
return return_value;
}
PyDoc_STRVAR(tuple_new__doc__,
"tuple(iterable=(), /)\n"
"--\n"
@ -114,4 +127,4 @@ tuple___getnewargs__(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return tuple___getnewargs___impl((PyTupleObject *)self);
}
/*[clinic end generated code: output=779cb4a13db67397 input=a9049054013a1b77]*/
/*[clinic end generated code: output=bd11662d62d973c2 input=a9049054013a1b77]*/

View file

@ -17,7 +17,7 @@ static int
type___instancecheck___impl(PyTypeObject *self, PyObject *instance);
static PyObject *
type___instancecheck__(PyTypeObject *self, PyObject *instance)
type___instancecheck__(PyObject *self, PyObject *instance)
{
PyObject *return_value = NULL;
int _return_value;
@ -45,7 +45,7 @@ static int
type___subclasscheck___impl(PyTypeObject *self, PyObject *subclass);
static PyObject *
type___subclasscheck__(PyTypeObject *self, PyObject *subclass)
type___subclasscheck__(PyObject *self, PyObject *subclass)
{
PyObject *return_value = NULL;
int _return_value;
@ -262,4 +262,4 @@ object___dir__(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return object___dir___impl(self);
}
/*[clinic end generated code: output=f7db85fd11818c63 input=a9049054013a1b77]*/
/*[clinic end generated code: output=b55c0d257e2518d2 input=a9049054013a1b77]*/

View file

@ -130,6 +130,19 @@ PyDoc_STRVAR(typevar_typing_subst__doc__,
#define TYPEVAR_TYPING_SUBST_METHODDEF \
{"__typing_subst__", (PyCFunction)typevar_typing_subst, METH_O, typevar_typing_subst__doc__},
static PyObject *
typevar_typing_subst_impl(typevarobject *self, PyObject *arg);
static PyObject *
typevar_typing_subst(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = typevar_typing_subst_impl((typevarobject *)self, arg);
return return_value;
}
PyDoc_STRVAR(typevar_typing_prepare_subst__doc__,
"__typing_prepare_subst__($self, alias, args, /)\n"
"--\n"
@ -418,6 +431,19 @@ PyDoc_STRVAR(paramspec_typing_subst__doc__,
#define PARAMSPEC_TYPING_SUBST_METHODDEF \
{"__typing_subst__", (PyCFunction)paramspec_typing_subst, METH_O, paramspec_typing_subst__doc__},
static PyObject *
paramspec_typing_subst_impl(paramspecobject *self, PyObject *arg);
static PyObject *
paramspec_typing_subst(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = paramspec_typing_subst_impl((paramspecobject *)self, arg);
return return_value;
}
PyDoc_STRVAR(paramspec_typing_prepare_subst__doc__,
"__typing_prepare_subst__($self, alias, args, /)\n"
"--\n"
@ -557,6 +583,19 @@ PyDoc_STRVAR(typevartuple_typing_subst__doc__,
#define TYPEVARTUPLE_TYPING_SUBST_METHODDEF \
{"__typing_subst__", (PyCFunction)typevartuple_typing_subst, METH_O, typevartuple_typing_subst__doc__},
static PyObject *
typevartuple_typing_subst_impl(typevartupleobject *self, PyObject *arg);
static PyObject *
typevartuple_typing_subst(PyObject *self, PyObject *arg)
{
PyObject *return_value = NULL;
return_value = typevartuple_typing_subst_impl((typevartupleobject *)self, arg);
return return_value;
}
PyDoc_STRVAR(typevartuple_typing_prepare_subst__doc__,
"__typing_prepare_subst__($self, alias, args, /)\n"
"--\n"
@ -706,4 +745,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
/*[clinic end generated code: output=f499d959a942c599 input=a9049054013a1b77]*/
/*[clinic end generated code: output=d0cdf708e2e315a4 input=a9049054013a1b77]*/

View file

@ -4234,8 +4234,8 @@ True if the dictionary has the specified key, else False.
[clinic start generated code]*/
static PyObject *
dict___contains__(PyDictObject *self, PyObject *key)
/*[clinic end generated code: output=a3d03db709ed6e6b input=fe1cb42ad831e820]*/
dict___contains___impl(PyDictObject *self, PyObject *key)
/*[clinic end generated code: output=1b314e6da7687dae input=fe1cb42ad831e820]*/
{
int contains = PyDict_Contains((PyObject *)self, key);
if (contains < 0) {

View file

@ -1416,8 +1416,8 @@ Extend list by appending elements from the iterable.
[clinic start generated code]*/
static PyObject *
list_extend(PyListObject *self, PyObject *iterable)
/*[clinic end generated code: output=630fb3bca0c8e789 input=979da7597a515791]*/
list_extend_impl(PyListObject *self, PyObject *iterable)
/*[clinic end generated code: output=b0eba9e0b186d5ce input=979da7597a515791]*/
{
if (_list_extend(self, iterable) < 0) {
return NULL;
@ -1428,7 +1428,7 @@ list_extend(PyListObject *self, PyObject *iterable)
PyObject *
_PyList_Extend(PyListObject *self, PyObject *iterable)
{
return list_extend(self, iterable);
return list_extend((PyObject*)self, iterable);
}
int
@ -3272,8 +3272,8 @@ Return number of occurrences of value.
[clinic start generated code]*/
static PyObject *
list_count(PyListObject *self, PyObject *value)
/*[clinic end generated code: output=b1f5d284205ae714 input=3bdc3a5e6f749565]*/
list_count_impl(PyListObject *self, PyObject *value)
/*[clinic end generated code: output=eff66f14aef2df86 input=3bdc3a5e6f749565]*/
{
Py_ssize_t count = 0;
for (Py_ssize_t i = 0; ; i++) {

View file

@ -2781,8 +2781,8 @@ Count the number of occurrences of a value.
[clinic start generated code]*/
static PyObject *
memoryview_count(PyMemoryViewObject *self, PyObject *value)
/*[clinic end generated code: output=e2c255a8d54eaa12 input=e3036ce1ed7d1823]*/
memoryview_count_impl(PyMemoryViewObject *self, PyObject *value)
/*[clinic end generated code: output=a15cb19311985063 input=e3036ce1ed7d1823]*/
{
PyObject *iter = PyObject_GetIter(_PyObject_CAST(self));
if (iter == NULL) {

View file

@ -1933,8 +1933,8 @@ Update the set, keeping only elements found in either set, but not in both.
[clinic start generated code]*/
static PyObject *
set_symmetric_difference_update(PySetObject *so, PyObject *other)
/*[clinic end generated code: output=fbb049c0806028de input=a50acf0365e1f0a5]*/
set_symmetric_difference_update_impl(PySetObject *so, PyObject *other)
/*[clinic end generated code: output=79f80b4ee5da66c1 input=a50acf0365e1f0a5]*/
{
if (Py_Is((PyObject *)so, other)) {
return set_clear((PyObject *)so, NULL);
@ -2004,7 +2004,7 @@ set_xor(PyObject *self, PyObject *other)
if (!PyAnySet_Check(self) || !PyAnySet_Check(other))
Py_RETURN_NOTIMPLEMENTED;
PySetObject *so = _PySet_CAST(self);
return set_symmetric_difference(so, other);
return set_symmetric_difference((PyObject*)so, other);
}
static PyObject *
@ -2016,7 +2016,7 @@ set_ixor(PyObject *self, PyObject *other)
Py_RETURN_NOTIMPLEMENTED;
PySetObject *so = _PySet_CAST(self);
result = set_symmetric_difference_update(so, other);
result = set_symmetric_difference_update((PyObject*)so, other);
if (result == NULL)
return NULL;
Py_DECREF(result);
@ -2083,7 +2083,7 @@ set_issuperset_impl(PySetObject *so, PyObject *other)
/*[clinic end generated code: output=ecf00ce552c09461 input=5f2e1f262e6e4ccc]*/
{
if (PyAnySet_Check(other)) {
return set_issubset((PySetObject *)other, (PyObject *)so);
return set_issubset(other, (PyObject *)so);
}
PyObject *key, *it = PyObject_GetIter(other);
@ -2127,7 +2127,7 @@ set_richcompare(PyObject *self, PyObject *w, int op)
((PySetObject *)w)->hash != -1 &&
v->hash != ((PySetObject *)w)->hash)
Py_RETURN_FALSE;
return set_issubset(v, w);
return set_issubset((PyObject*)v, w);
case Py_NE:
r1 = set_richcompare((PyObject*)v, w, Py_EQ);
if (r1 == NULL)
@ -2138,17 +2138,17 @@ set_richcompare(PyObject *self, PyObject *w, int op)
return NULL;
return PyBool_FromLong(!r2);
case Py_LE:
return set_issubset(v, w);
return set_issubset((PyObject*)v, w);
case Py_GE:
return set_issuperset(v, w);
return set_issuperset((PyObject*)v, w);
case Py_LT:
if (PySet_GET_SIZE(v) >= PySet_GET_SIZE(w))
Py_RETURN_FALSE;
return set_issubset(v, w);
return set_issubset((PyObject*)v, w);
case Py_GT:
if (PySet_GET_SIZE(v) <= PySet_GET_SIZE(w))
Py_RETURN_FALSE;
return set_issuperset(v, w);
return set_issuperset((PyObject*)v, w);
}
Py_RETURN_NOTIMPLEMENTED;
}

View file

@ -604,8 +604,8 @@ Return number of occurrences of value.
[clinic start generated code]*/
static PyObject *
tuple_count(PyTupleObject *self, PyObject *value)
/*[clinic end generated code: output=aa927affc5a97605 input=531721aff65bd772]*/
tuple_count_impl(PyTupleObject *self, PyObject *value)
/*[clinic end generated code: output=cf02888d4bc15d7a input=531721aff65bd772]*/
{
Py_ssize_t count = 0;
Py_ssize_t i;

View file

@ -749,8 +749,8 @@ typevar.__typing_subst__ as typevar_typing_subst
[clinic start generated code]*/
static PyObject *
typevar_typing_subst(typevarobject *self, PyObject *arg)
/*[clinic end generated code: output=0773735e8ce18968 input=9e87b57f0fc59b92]*/
typevar_typing_subst_impl(typevarobject *self, PyObject *arg)
/*[clinic end generated code: output=c76ced134ed8f4e1 input=9e87b57f0fc59b92]*/
{
PyObject *args[2] = {(PyObject *)self, arg};
PyObject *result = call_typing_func_object("_typevar_subst", args, 2);
@ -1358,8 +1358,8 @@ paramspec.__typing_subst__ as paramspec_typing_subst
[clinic start generated code]*/
static PyObject *
paramspec_typing_subst(paramspecobject *self, PyObject *arg)
/*[clinic end generated code: output=4c5b4aaada1c5814 input=2d5b5e3d4a717189]*/
paramspec_typing_subst_impl(paramspecobject *self, PyObject *arg)
/*[clinic end generated code: output=803e1ade3f13b57d input=2d5b5e3d4a717189]*/
{
PyObject *args[2] = {(PyObject *)self, arg};
PyObject *result = call_typing_func_object("_paramspec_subst", args, 2);
@ -1612,8 +1612,8 @@ typevartuple.__typing_subst__ as typevartuple_typing_subst
[clinic start generated code]*/
static PyObject *
typevartuple_typing_subst(typevartupleobject *self, PyObject *arg)
/*[clinic end generated code: output=237054c6d7484eea input=3fcf2dfd9eee7945]*/
typevartuple_typing_subst_impl(typevartupleobject *self, PyObject *arg)
/*[clinic end generated code: output=814316519441cd76 input=3fcf2dfd9eee7945]*/
{
PyErr_SetString(PyExc_TypeError, "Substitution of bare TypeVarTuple is not supported");
return NULL;

View file

@ -1303,8 +1303,8 @@ This is guaranteed to be unique among simultaneously existing objects.
[clinic start generated code]*/
static PyObject *
builtin_id(PyModuleDef *self, PyObject *v)
/*[clinic end generated code: output=0aa640785f697f65 input=5a534136419631f4]*/
builtin_id_impl(PyModuleDef *self, PyObject *v)
/*[clinic end generated code: output=4908a6782ed343e9 input=5a534136419631f4]*/
{
PyObject *id = PyLong_FromVoidPtr(v);

View file

@ -628,6 +628,19 @@ PyDoc_STRVAR(builtin_id__doc__,
#define BUILTIN_ID_METHODDEF \
{"id", (PyCFunction)builtin_id, METH_O, builtin_id__doc__},
static PyObject *
builtin_id_impl(PyModuleDef *self, PyObject *v);
static PyObject *
builtin_id(PyObject *self, PyObject *v)
{
PyObject *return_value = NULL;
return_value = builtin_id_impl((PyModuleDef *)self, v);
return return_value;
}
PyDoc_STRVAR(builtin_setattr__doc__,
"setattr($module, obj, name, value, /)\n"
"--\n"
@ -1239,4 +1252,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=b0178189d13e8bf8 input=a9049054013a1b77]*/
/*[clinic end generated code: output=c08e0e086a791ff0 input=a9049054013a1b77]*/

View file

@ -168,6 +168,19 @@ PyDoc_STRVAR(_contextvars_ContextVar_set__doc__,
#define _CONTEXTVARS_CONTEXTVAR_SET_METHODDEF \
{"set", (PyCFunction)_contextvars_ContextVar_set, METH_O, _contextvars_ContextVar_set__doc__},
static PyObject *
_contextvars_ContextVar_set_impl(PyContextVar *self, PyObject *value);
static PyObject *
_contextvars_ContextVar_set(PyObject *self, PyObject *value)
{
PyObject *return_value = NULL;
return_value = _contextvars_ContextVar_set_impl((PyContextVar *)self, value);
return return_value;
}
PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
"reset($self, token, /)\n"
"--\n"
@ -180,6 +193,19 @@ PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
static PyObject *
_contextvars_ContextVar_reset_impl(PyContextVar *self, PyObject *token);
static PyObject *
_contextvars_ContextVar_reset(PyObject *self, PyObject *token)
{
PyObject *return_value = NULL;
return_value = _contextvars_ContextVar_reset_impl((PyContextVar *)self, token);
return return_value;
}
PyDoc_STRVAR(token_enter__doc__,
"__enter__($self, /)\n"
"--\n"
@ -230,4 +256,4 @@ token_exit(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=01987cdbf68a951a input=a9049054013a1b77]*/
/*[clinic end generated code: output=3a04b2fddf24c3e9 input=a9049054013a1b77]*/

View file

@ -1058,8 +1058,8 @@ value via the `ContextVar.reset()` method.
[clinic start generated code]*/
static PyObject *
_contextvars_ContextVar_set(PyContextVar *self, PyObject *value)
/*[clinic end generated code: output=446ed5e820d6d60b input=c0a6887154227453]*/
_contextvars_ContextVar_set_impl(PyContextVar *self, PyObject *value)
/*[clinic end generated code: output=1b562d35cc79c806 input=c0a6887154227453]*/
{
return PyContextVar_Set((PyObject *)self, value);
}
@ -1076,8 +1076,8 @@ created the token was used.
[clinic start generated code]*/
static PyObject *
_contextvars_ContextVar_reset(PyContextVar *self, PyObject *token)
/*[clinic end generated code: output=d4ee34d0742d62ee input=ebe2881e5af4ffda]*/
_contextvars_ContextVar_reset_impl(PyContextVar *self, PyObject *token)
/*[clinic end generated code: output=3205d2bdff568521 input=ebe2881e5af4ffda]*/
{
if (!PyContextToken_CheckExact(token)) {
PyErr_Format(PyExc_TypeError,

View file

@ -423,14 +423,14 @@ class CLanguage(Language):
# HACK
# when we're METH_O, but have a custom return converter,
# we use "impl_parameters" for the parsing function
# we use "parser_parameters" for the parsing function
# because that works better. but that means we must
# suppress actually declaring the impl's parameters
# as variables in the parsing function. but since it's
# METH_O, we have exactly one anyway, so we know exactly
# where it is.
if ("METH_O" in templates['methoddef_define'] and
'{impl_parameters}' in templates['parser_prototype']):
'{parser_parameters}' in templates['parser_prototype']):
data.declarations.pop(0)
full_name = f.full_name
@ -475,6 +475,7 @@ class CLanguage(Language):
else:
template_dict['parse_arguments_comma'] = '';
template_dict['impl_parameters'] = ", ".join(data.impl_parameters)
template_dict['parser_parameters'] = ", ".join(data.impl_parameters[1:])
template_dict['impl_arguments'] = ", ".join(data.impl_arguments)
template_dict['return_conversion'] = libclinic.format_escape("".join(data.return_conversion).rstrip())

View file

@ -60,6 +60,7 @@ class defining_class_converter(CConverter):
type = 'PyTypeObject *'
format_unit = ''
show_in_signature = False
specified_type: str | None = None
def converter_init(self, *, type: str | None = None) -> None:
self.specified_type = type
@ -1126,6 +1127,7 @@ class self_converter(CConverter):
"""
type: str | None = None
format_unit = ''
specified_type: str | None = None
def converter_init(self, *, type: str | None = None) -> None:
self.specified_type = type

View file

@ -134,7 +134,7 @@ PARSER_PROTOTYPE_SETTER: Final[str] = libclinic.normalize_snippet("""
""")
METH_O_PROTOTYPE: Final[str] = libclinic.normalize_snippet("""
static PyObject *
{c_basename}({impl_parameters})
{c_basename}({self_type}{self_name}, {parser_parameters})
""")
DOCSTRING_PROTOTYPE_VAR: Final[str] = libclinic.normalize_snippet("""
PyDoc_VAR({c_basename}__doc__);
@ -195,6 +195,7 @@ class ParseArgsCodeGen:
# Function parameters
parameters: list[Parameter]
self_parameter_converter: self_converter
converters: list[CConverter]
# Is 'defining_class' used for the first parameter?
@ -236,9 +237,10 @@ class ParseArgsCodeGen:
self.codegen = codegen
self.parameters = list(self.func.parameters.values())
first_param = self.parameters.pop(0)
if not isinstance(first_param.converter, self_converter):
self_parameter = self.parameters.pop(0)
if not isinstance(self_parameter.converter, self_converter):
raise ValueError("the first parameter must use self_converter")
self.self_parameter_converter = self_parameter.converter
self.requires_defining_class = False
if self.parameters and isinstance(self.parameters[0].converter, defining_class_converter):
@ -293,6 +295,11 @@ class ParseArgsCodeGen:
return (self.func.return_converter.type == 'PyObject *'
and not self.func.critical_section)
def use_pyobject_self(self) -> bool:
pyobject_types = ('PyObject *', None)
return (self.self_parameter_converter.type in pyobject_types
and self.self_parameter_converter.specified_type in pyobject_types)
def select_prototypes(self) -> None:
self.docstring_prototype = ''
self.docstring_definition = ''
@ -403,7 +410,7 @@ class ParseArgsCodeGen:
self.converters[0].format_unit == 'O'):
meth_o_prototype = METH_O_PROTOTYPE
if self.use_simple_return():
if self.use_simple_return() and self.use_pyobject_self():
# maps perfectly to METH_O, doesn't need a return converter.
# so we skip making a parse function
# and call directly into the impl function.