diff options
Diffstat (limited to 'src/lib/utils/sqlite3')
-rw-r--r-- | src/lib/utils/sqlite3/sqlite3.cpp | 8 | ||||
-rw-r--r-- | src/lib/utils/sqlite3/sqlite3.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/utils/sqlite3/sqlite3.cpp b/src/lib/utils/sqlite3/sqlite3.cpp index 251cbcdf5..09a964a46 100644 --- a/src/lib/utils/sqlite3/sqlite3.cpp +++ b/src/lib/utils/sqlite3/sqlite3.cpp @@ -92,21 +92,21 @@ void Sqlite3_Database::Sqlite3_Statement::bind(int column, std::chrono::system_c bind(column, timeval); } -void Sqlite3_Database::Sqlite3_Statement::bind(int column, const std::vector<byte>& val) +void Sqlite3_Database::Sqlite3_Statement::bind(int column, const std::vector<uint8_t>& val) { int rc = ::sqlite3_bind_blob(m_stmt, column, val.data(), val.size(), SQLITE_TRANSIENT); if(rc != SQLITE_OK) throw SQL_DB_Error("sqlite3_bind_text failed, code " + std::to_string(rc)); } -void Sqlite3_Database::Sqlite3_Statement::bind(int column, const byte* p, size_t len) +void Sqlite3_Database::Sqlite3_Statement::bind(int column, const uint8_t* p, size_t len) { int rc = ::sqlite3_bind_blob(m_stmt, column, p, len, SQLITE_TRANSIENT); if(rc != SQLITE_OK) throw SQL_DB_Error("sqlite3_bind_text failed, code " + std::to_string(rc)); } -std::pair<const byte*, size_t> Sqlite3_Database::Sqlite3_Statement::get_blob(int column) +std::pair<const uint8_t*, size_t> Sqlite3_Database::Sqlite3_Statement::get_blob(int column) { BOTAN_ASSERT(::sqlite3_column_type(m_stmt, 0) == SQLITE_BLOB, "Return value is a blob"); @@ -116,7 +116,7 @@ std::pair<const byte*, size_t> Sqlite3_Database::Sqlite3_Statement::get_blob(int BOTAN_ASSERT(session_blob_size >= 0, "Blob size is non-negative"); - return std::make_pair(static_cast<const byte*>(session_blob), + return std::make_pair(static_cast<const uint8_t*>(session_blob), static_cast<size_t>(session_blob_size)); } diff --git a/src/lib/utils/sqlite3/sqlite3.h b/src/lib/utils/sqlite3/sqlite3.h index 659e1c487..5f262d8e6 100644 --- a/src/lib/utils/sqlite3/sqlite3.h +++ b/src/lib/utils/sqlite3/sqlite3.h @@ -34,10 +34,10 @@ class BOTAN_DLL Sqlite3_Database : public SQL_Database void bind(int column, const std::string& val) override; void bind(int column, size_t val) override; void bind(int column, std::chrono::system_clock::time_point time) override; - void bind(int column, const std::vector<byte>& val) override; - void bind(int column, const byte* data, size_t len) override; + void bind(int column, const std::vector<uint8_t>& val) override; + void bind(int column, const uint8_t* data, size_t len) override; - std::pair<const byte*, size_t> get_blob(int column) override; + std::pair<const uint8_t*, size_t> get_blob(int column) override; size_t get_size_t(int column) override; size_t spin() override; |