@@ -31,7 +31,7 @@ pysqlite_cursor_init(PyObject *self, PyObject *args, PyObject *kwargs)
31
31
}
32
32
33
33
PyDoc_STRVAR (pysqlite_cursor_execute__doc__ ,
34
- "execute($self, sql, parameters=<unrepresentable> , /)\n"
34
+ "execute($self, sql, parameters=() , /)\n"
35
35
"--\n"
36
36
"\n"
37
37
"Executes a SQL statement." );
@@ -73,7 +73,7 @@ pysqlite_cursor_execute(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t
73
73
}
74
74
75
75
PyDoc_STRVAR (pysqlite_cursor_executemany__doc__ ,
76
- "executemany($self, sql, parameters=<unrepresentable> , /)\n"
76
+ "executemany($self, sql, seq_of_parameters , /)\n"
77
77
"--\n"
78
78
"\n"
79
79
"Repeatedly executes a SQL statement." );
@@ -83,16 +83,16 @@ PyDoc_STRVAR(pysqlite_cursor_executemany__doc__,
83
83
84
84
static PyObject *
85
85
pysqlite_cursor_executemany_impl (pysqlite_Cursor * self , PyObject * sql ,
86
- PyObject * parameters );
86
+ PyObject * seq_of_parameters );
87
87
88
88
static PyObject *
89
89
pysqlite_cursor_executemany (pysqlite_Cursor * self , PyObject * const * args , Py_ssize_t nargs )
90
90
{
91
91
PyObject * return_value = NULL ;
92
92
PyObject * sql ;
93
- PyObject * parameters = NULL ;
93
+ PyObject * seq_of_parameters ;
94
94
95
- if (!_PyArg_CheckPositional ("executemany" , nargs , 1 , 2 )) {
95
+ if (!_PyArg_CheckPositional ("executemany" , nargs , 2 , 2 )) {
96
96
goto exit ;
97
97
}
98
98
if (!PyUnicode_Check (args [0 ])) {
@@ -103,12 +103,8 @@ pysqlite_cursor_executemany(pysqlite_Cursor *self, PyObject *const *args, Py_ssi
103
103
goto exit ;
104
104
}
105
105
sql = args [0 ];
106
- if (nargs < 2 ) {
107
- goto skip_optional ;
108
- }
109
- parameters = args [1 ];
110
- skip_optional :
111
- return_value = pysqlite_cursor_executemany_impl (self , sql , parameters );
106
+ seq_of_parameters = args [1 ];
107
+ return_value = pysqlite_cursor_executemany_impl (self , sql , seq_of_parameters );
112
108
113
109
exit :
114
110
return return_value ;
@@ -283,4 +279,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored))
283
279
{
284
280
return pysqlite_cursor_close_impl (self );
285
281
}
286
- /*[clinic end generated code: output=29b5b24ed34ba996 input=a9049054013a1b77]*/
282
+ /*[clinic end generated code: output=84d4ba48a211657b input=a9049054013a1b77]*/
0 commit comments