Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert sqlite3.complete_statement() docstring
  • Loading branch information
Erlend E. Aasland committed Feb 9, 2021
commit 22a94be93cc37778f61ead71644a275cb69323ec
8 changes: 4 additions & 4 deletions Modules/_sqlite/clinic/module.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ preserve
[clinic start generated code]*/

PyDoc_STRVAR(pysqlite_complete_statement__doc__,
"complete_statement($module, /, sql)\n"
"complete_statement($module, /, statement)\n"
"--\n"
"\n"
"Checks if a string contains a complete SQL statement. Non-standard.");
Expand All @@ -18,7 +18,7 @@ static PyObject *
pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sql", NULL};
static const char * const _keywords[] = {"statement", NULL};
static _PyArg_Parser _parser = {NULL, _keywords, "complete_statement", 0};
PyObject *argsbuf[1];
const char *statement;
Expand All @@ -28,7 +28,7 @@ pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t
goto exit;
}
if (!PyUnicode_Check(args[0])) {
_PyArg_BadArgument("complete_statement", "argument 'sql'", "str", args[0]);
_PyArg_BadArgument("complete_statement", "argument 'statement'", "str", args[0]);
goto exit;
}
Py_ssize_t statement_length;
Expand Down Expand Up @@ -220,4 +220,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=35569d190153173b input=a9049054013a1b77]*/
/*[clinic end generated code: output=508d362707c8654d input=a9049054013a1b77]*/
4 changes: 2 additions & 2 deletions Modules/_sqlite/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ RAM instead of on disk.");
/*[clinic input]
_sqlite3.complete_statement as pysqlite_complete_statement

sql as statement: str
statement: str

Checks if a string contains a complete SQL statement. Non-standard.
[clinic start generated code]*/

static PyObject *
pysqlite_complete_statement_impl(PyObject *module, const char *statement)
/*[clinic end generated code: output=e55f1ff1952df558 input=3ed6064706d8647d]*/
/*[clinic end generated code: output=e55f1ff1952df558 input=f6b24996b31c5c33]*/
{
if (sqlite3_complete(statement)) {
return Py_NewRef(Py_True);
Expand Down