From 7f955ff6f6a7f2407b24a638fde95efbd5c38737 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 7 Jul 2023 15:42:55 +0200 Subject: sqlite: minor refactoring --- src/sqlite.c | 4 ++-- src/sqlite.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sqlite.c b/src/sqlite.c index 8078739..7080928 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -46,7 +46,7 @@ void sqlite_destroy(void) sqlite_errno_if(sqlite3_shutdown(), "sqlite3_shutdown"); } -int sqlite_open(const char *path, sqlite3 **db, int flags) +static int sqlite_open(const char *path, sqlite3 **db, int flags) { int ret = 0; @@ -89,7 +89,7 @@ int sqlite_exec(sqlite3 *db, const char *stmt, sqlite3_callback callback, void * return ret; } -int sqlite_log_result(UNUSED void *arg, int numof_columns, char **values, char **column_names) +int sqlite_exec_log_result(UNUSED void *arg, int numof_columns, char **values, char **column_names) { log("Row:\n"); for (int i = 0; i < numof_columns; ++i) { diff --git a/src/sqlite.h b/src/sqlite.h index 5f5b285..20386d4 100644 --- a/src/sqlite.h +++ b/src/sqlite.h @@ -13,13 +13,12 @@ int sqlite_init(void); void sqlite_destroy(void); -int sqlite_open(const char *path, sqlite3 **db, int flags); 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, void *arg); -int sqlite_log_result(void *, int, char **, char **); +int sqlite_exec_log_result(void *, int, char **, char **); int sqlite_prepare(sqlite3 *db, const char *stmt, sqlite3_stmt **result); void sqlite_reset(sqlite3_stmt *); -- cgit v1.2.3