Use "PyObject*" for METH_O functions to fix an undefined behavior.
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;
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]
[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");
[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");
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;
}
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);
[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. */
[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);
}
[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);
}
[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);
}
[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 */
[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;
[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;
[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;
}
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
[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;
[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;
/* 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);
}
else {
PyObject *res;
- res = _io_BytesIO_write(self, initvalue);
+ res = _io_BytesIO_write_impl(self, initvalue);
if (res == NULL)
return -1;
Py_DECREF(res);
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=f019d29701ba2556 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1a0562c66776fd53 input=a9049054013a1b77]*/
#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"
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=8a5e153bc7584b55 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=477217b2bc464110 input=a9049054013a1b77]*/
_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;
_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;
return return_value;
}
-/*[clinic end generated code: output=7796e223e778a214 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=69c9b100a359cbd5 input=a9049054013a1b77]*/
#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"
return return_value;
}
-/*[clinic end generated code: output=6e64e43113a97340 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=dad68d8c33d676e6 input=a9049054013a1b77]*/
[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;
#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"
#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]*/
#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"
{
return pysqlite_cursor_close_impl((pysqlite_Cursor *)self);
}
-/*[clinic end generated code: output=82620ca7622b547c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=02831aed7377f5f6 input=a9049054013a1b77]*/
[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;
[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;
}
#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__,
#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"
#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]*/
[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);
}
[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);
}
[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;
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[] = {
[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;
[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;
[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;
[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;
[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;
[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;
[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);
}
[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;
[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;
[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);
}
[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;
[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())
[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;
#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"
#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"
_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;
exit:
return return_value;
}
-/*[clinic end generated code: output=f14ff14c29c691ec input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b1060b180d9dd54c input=a9049054013a1b77]*/
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;
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;
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;
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;
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;
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;
exit:
return return_value;
}
-/*[clinic end generated code: output=2d89c39288fc7389 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1eb3634d5ef8b407 input=a9049054013a1b77]*/
#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"
#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]*/
#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"
#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"
#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"
#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"
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=e5c758958f14f102 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0eed58350c3c1832 input=a9049054013a1b77]*/
#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__,
#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]*/
_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;
exit:
return return_value;
}
-/*[clinic end generated code: output=859cfbf59c133a4e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=4458b5a69201ebea input=a9049054013a1b77]*/
_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;
_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;
#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]*/
#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"
return return_value;
}
-/*[clinic end generated code: output=ec540c21be08e1d0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c7c051850b7ad427 input=a9049054013a1b77]*/
#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"
#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"
#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"
#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"
#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__,
#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"
#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]*/
#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"
#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"
#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"
#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"
#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"
#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]*/
#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"
{
return _blake2_blake2b_hexdigest_impl((Blake2Object *)self);
}
-/*[clinic end generated code: output=6e03c947b7e0d973 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b286a0d1be8729b0 input=a9049054013a1b77]*/
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=a4292eab710dcb60 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=10db0ff2ecf97159 input=a9049054013a1b77]*/
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=ad6f3788a6e7ff6f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=3cfa7b6a9f99b5b2 input=a9049054013a1b77]*/
#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"
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=1d7fec114eb6b6e3 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0c2eed5c77ec6987 input=a9049054013a1b77]*/
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=21da06d9570969d8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=437023d9eac08551 input=a9049054013a1b77]*/
[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;
[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;
[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;
[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;
[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;
[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);
}
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;
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;
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;
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;
{
return bytearray_sizeof_impl((PyByteArrayObject *)self);
}
-/*[clinic end generated code: output=5e33422343b47af9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7c924a56e0a8bfe6 input=a9049054013a1b77]*/
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=96fe2d6ef9ac8f6a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=61cb2cf6506df4c6 input=a9049054013a1b77]*/
#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"
{
return dict_values_impl((PyDictObject *)self);
}
-/*[clinic end generated code: output=0f04bf0e7e6b130f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8a104741e4676c76 input=a9049054013a1b77]*/
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;
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;
PyObject *excs);
static PyObject *
-BaseExceptionGroup_derive(PyBaseExceptionGroupObject *self, PyObject *excs)
+BaseExceptionGroup_derive(PyObject *self, PyObject *excs)
{
PyObject *return_value = NULL;
PyObject *matcher_value);
static PyObject *
-BaseExceptionGroup_split(PyBaseExceptionGroupObject *self, PyObject *matcher_value)
+BaseExceptionGroup_split(PyObject *self, PyObject *matcher_value)
{
PyObject *return_value = NULL;
PyObject *matcher_value);
static PyObject *
-BaseExceptionGroup_subgroup(PyBaseExceptionGroupObject *self, PyObject *matcher_value)
+BaseExceptionGroup_subgroup(PyObject *self, PyObject *matcher_value)
{
PyObject *return_value = NULL;
return return_value;
}
-/*[clinic end generated code: output=19aed708dcaf7184 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fcf70b3b71f3d14a input=a9049054013a1b77]*/
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;
#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"
#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"
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;
{
return list___reversed___impl((PyListObject *)self);
}
-/*[clinic end generated code: output=35c43dc33f9ba521 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bc45e43a621ac833 input=a9049054013a1b77]*/
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=2ef6c061d9c4e3dc input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c0371164b68a6839 input=a9049054013a1b77]*/
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;
#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"
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;
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;
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;
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;
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;
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;
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;
return return_value;
}
-/*[clinic end generated code: output=83b7742a762ce465 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e2f1470de062d661 input=a9049054013a1b77]*/
#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"
{
return tuple___getnewargs___impl((PyTupleObject *)self);
}
-/*[clinic end generated code: output=779cb4a13db67397 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bd11662d62d973c2 input=a9049054013a1b77]*/
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;
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;
{
return object___dir___impl(self);
}
-/*[clinic end generated code: output=f7db85fd11818c63 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b55c0d257e2518d2 input=a9049054013a1b77]*/
#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"
#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"
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=f499d959a942c599 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d0cdf708e2e315a4 input=a9049054013a1b77]*/
[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) {
[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;
PyObject *
_PyList_Extend(PyListObject *self, PyObject *iterable)
{
- return list_extend(self, iterable);
+ return list_extend((PyObject*)self, iterable);
}
int
[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++) {
[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) {
[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);
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 *
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);
/*[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);
((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)
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;
}
[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;
[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);
[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);
[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;
[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);
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=b0178189d13e8bf8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c08e0e086a791ff0 input=a9049054013a1b77]*/
#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"
#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"
exit:
return return_value;
}
-/*[clinic end generated code: output=01987cdbf68a951a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=3a04b2fddf24c3e9 input=a9049054013a1b77]*/
[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);
}
[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,
# 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
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())
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
"""
type: str | None = None
format_unit = ''
+ specified_type: str | None = None
def converter_init(self, *, type: str | None = None) -> None:
self.specified_type = type
""")
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__);
# Function parameters
parameters: list[Parameter]
+ self_parameter_converter: self_converter
converters: list[CConverter]
# Is 'defining_class' used for the first parameter?
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):
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 = ''
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.