diff options
Diffstat (limited to 'Modules/_sqlite/util.c')
-rw-r--r-- | Modules/_sqlite/util.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index f5a7233..b70297b 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -24,8 +24,7 @@ #include "module.h" #include "connection.h" -int _sqlite_step_with_busyhandler(sqlite3_stmt* statement, Connection* connection -) +int _sqlite_step_with_busyhandler(sqlite3_stmt* statement, pysqlite_Connection* connection) { int rc; @@ -40,7 +39,7 @@ int _sqlite_step_with_busyhandler(sqlite3_stmt* statement, Connection* connectio * Checks the SQLite error code and sets the appropriate DB-API exception. * Returns the error code (0 means no error occurred). */ -int _seterror(sqlite3* db) +int _pysqlite_seterror(sqlite3* db) { int errorcode; @@ -53,7 +52,7 @@ int _seterror(sqlite3* db) break; case SQLITE_INTERNAL: case SQLITE_NOTFOUND: - PyErr_SetString(InternalError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_InternalError, sqlite3_errmsg(db)); break; case SQLITE_NOMEM: (void)PyErr_NoMemory(); @@ -71,23 +70,23 @@ int _seterror(sqlite3* db) case SQLITE_PROTOCOL: case SQLITE_EMPTY: case SQLITE_SCHEMA: - PyErr_SetString(OperationalError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_OperationalError, sqlite3_errmsg(db)); break; case SQLITE_CORRUPT: - PyErr_SetString(DatabaseError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_DatabaseError, sqlite3_errmsg(db)); break; case SQLITE_TOOBIG: - PyErr_SetString(DataError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_DataError, sqlite3_errmsg(db)); break; case SQLITE_CONSTRAINT: case SQLITE_MISMATCH: - PyErr_SetString(IntegrityError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_IntegrityError, sqlite3_errmsg(db)); break; case SQLITE_MISUSE: - PyErr_SetString(ProgrammingError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_ProgrammingError, sqlite3_errmsg(db)); break; default: - PyErr_SetString(DatabaseError, sqlite3_errmsg(db)); + PyErr_SetString(pysqlite_DatabaseError, sqlite3_errmsg(db)); break; } |