diff options
Diffstat (limited to '')
-rw-r--r-- | src/sqlite.c | 8 | ||||
-rw-r--r-- | src/sqlite.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/sqlite.c b/src/sqlite.c index 88ec7bf..8078739 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -76,11 +76,11 @@ void sqlite_close(sqlite3 *db) sqlite_errno_if(sqlite3_close(db), "sqlite3_close"); } -int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback) +int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback, void *arg) { int ret = 0; - ret = sqlite3_exec(db, stmt, callback, NULL, NULL); + ret = sqlite3_exec(db, stmt, callback, arg, NULL); if (ret) { sqlite_errno(ret, "sqlite3_exec"); return ret; @@ -247,7 +247,7 @@ int sqlite_exec_as_transaction(sqlite3 *db, const char *stmt) } snprintf(full_stmt, nb, fmt, stmt); - ret = sqlite_exec(db, stmt, NULL); + ret = sqlite_exec(db, stmt, NULL, NULL); goto free; free: @@ -294,5 +294,5 @@ finalize: int sqlite_set_foreign_keys(sqlite3 *db) { static const char *const sql = "PRAGMA foreign_keys = ON;"; - return sqlite_exec(db, sql, NULL); + return sqlite_exec(db, sql, NULL, NULL); } diff --git a/src/sqlite.h b/src/sqlite.h index 28c9b7a..5f5b285 100644 --- a/src/sqlite.h +++ b/src/sqlite.h @@ -18,7 +18,7 @@ int sqlite_open_rw(const char *path, sqlite3 **db); int sqlite_open_ro(const char *path, sqlite3 **db); void sqlite_close(sqlite3 *db); -int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback); +int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback, void *arg); int sqlite_log_result(void *, int, char **, char **); int sqlite_prepare(sqlite3 *db, const char *stmt, sqlite3_stmt **result); |