mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
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:
parent
4162bc133b
commit
9d759b63d8
66 changed files with 843 additions and 190 deletions
16
Modules/_sqlite/clinic/connection.c.h
generated
16
Modules/_sqlite/clinic/connection.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
15
Modules/_sqlite/clinic/cursor.c.h
generated
15
Modules/_sqlite/clinic/cursor.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue