File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -272,8 +272,8 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self)
272
272
PyObject * error_msg ;
273
273
274
274
if (self -> reset ) {
275
- pysqlite_state * state = pysqlite_get_state ( NULL ) ;
276
- PyErr_SetString (state -> InterfaceError , errmsg_fetch_across_rollback );
275
+ PyObject * exc = self -> connection -> InterfaceError ;
276
+ PyErr_SetString (exc , errmsg_fetch_across_rollback );
277
277
return NULL ;
278
278
}
279
279
@@ -823,8 +823,8 @@ pysqlite_cursor_iternext(pysqlite_Cursor *self)
823
823
}
824
824
825
825
if (self -> reset ) {
826
- pysqlite_state * state = pysqlite_get_state ( NULL ) ;
827
- PyErr_SetString (state -> InterfaceError , errmsg_fetch_across_rollback );
826
+ PyObject * exc = self -> connection -> InterfaceError ;
827
+ PyErr_SetString (exc , errmsg_fetch_across_rollback );
828
828
return NULL ;
829
829
}
830
830
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ pysqlite_statement_create(pysqlite_Connection *connection, PyObject *sql)
56
56
Py_ssize_t size ;
57
57
const char * sql_cstr = PyUnicode_AsUTF8AndSize (sql , & size );
58
58
if (sql_cstr == NULL ) {
59
- PyErr_Format ( state -> Warning ,
60
- "SQL is of wrong type ('%s'). Must be string." ,
59
+ PyObject * exc = connection -> Warning ;
60
+ PyErr_Format ( exc , "SQL is of wrong type ('%s'). Must be string." ,
61
61
Py_TYPE (sql )-> tp_name );
62
62
return NULL ;
63
63
}
@@ -87,8 +87,8 @@ pysqlite_statement_create(pysqlite_Connection *connection, PyObject *sql)
87
87
}
88
88
89
89
if (pysqlite_check_remaining_sql (tail )) {
90
- PyErr_SetString ( state -> Warning ,
91
- "You can only execute one statement at a time." );
90
+ PyObject * exc = connection -> Warning ;
91
+ PyErr_SetString ( exc , "You can only execute one statement at a time." );
92
92
goto error ;
93
93
}
94
94
You can’t perform that action at this time.
0 commit comments