mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-92206: Improve scoping of sqlite3 reset statement helper (#92241)
This commit is contained in:
parent
d5dfcd4489
commit
415944379f
3 changed files with 28 additions and 30 deletions
|
@ -366,25 +366,6 @@ pysqlite_statement_bind_parameters(pysqlite_state *state,
|
|||
}
|
||||
}
|
||||
|
||||
int pysqlite_statement_reset(pysqlite_Statement* self)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = SQLITE_OK;
|
||||
|
||||
if (self->in_use && self->st) {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
rc = sqlite3_reset(self->st);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (rc == SQLITE_OK) {
|
||||
self->in_use = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void pysqlite_statement_mark_dirty(pysqlite_Statement* self)
|
||||
{
|
||||
self->in_use = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue