From c28ee29250b55bb9305bdcf2d5774f75c193976a Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Sat, 30 Jul 2022 09:44:22 -0500 Subject: [PATCH] Fixed compile issue with macro name and C string --- include/cache.hpp | 2 +- src/cache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cache.hpp b/include/cache.hpp index 6d54a8c..74855ae 100644 --- a/include/cache.hpp +++ b/include/cache.hpp @@ -17,7 +17,7 @@ namespace gdpm::cache{ std::vector get_installed_packages(const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int update_package_info(const std::vector& packages, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int update_sync_info(const std::vector& download_urls, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); - int delete_packages(const std::vector& package_titles, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_TABLENAME); + int delete_packages(const std::vector& package_titles, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int delete_packages(const std::vector& package_ids, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int drop_package_database(const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); diff --git a/src/cache.cpp b/src/cache.cpp index 2b17b7a..9ba955f 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -320,7 +320,7 @@ namespace gdpm::cache{ char *errmsg = nullptr; std::string sql; - int rc = sqlite3_open(cache_path, &db); + int rc = sqlite3_open(cache_path.c_str(), &db); if(rc != SQLITE_OK){ log::error("delete_packages.sqlite3_open(): {}", sqlite3_errmsg(db)); sqlite3_close(db);