summaryrefslogtreecommitdiff
path: root/modules/extra/m_sqlite.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2011-10-24 16:32:29 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2011-10-24 16:32:29 -0400
commit377a7a968b6a906f262a45abea9a563ffc471938 (patch)
tree3743f5d564bd7b40db5659bf6e18dd102b5c5c19 /modules/extra/m_sqlite.cpp
parentd0513d6506ce34b57874ad265daf38ca67878aa0 (diff)
Fixed bug #1349 (m_sqlite compiles without error under FreeBSD), as well as use C99's stdint.h (or cstdint if available) to get (u)intX_t types instead of our stupid typedefs. pstdint.h included in case there is no cstdint or stdint.h available.
Diffstat (limited to 'modules/extra/m_sqlite.cpp')
-rw-r--r--modules/extra/m_sqlite.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp
index adf244bbd..58eab1c32 100644
--- a/modules/extra/m_sqlite.cpp
+++ b/modules/extra/m_sqlite.cpp
@@ -147,15 +147,15 @@ SQLResult SQLiteService::RunQuery(const SQLQuery &query)
int err = sqlite3_prepare_v2(this->sql, real_query.c_str(), real_query.length(), &stmt, NULL);
if (err != SQLITE_OK)
return SQLiteResult(query, real_query, sqlite3_errmsg(this->sql));
-
+
std::vector<Anope::string> columns;
int cols = sqlite3_column_count(stmt);
columns.resize(cols);
for (int i = 0; i < cols; ++i)
columns[i] = sqlite3_column_name(stmt, i);
-
+
SQLiteResult result(query, real_query);
-
+
do
{
err = sqlite3_step(stmt);
@@ -175,7 +175,7 @@ SQLResult SQLiteService::RunQuery(const SQLQuery &query)
if (err != SQLITE_DONE)
return SQLiteResult(query, real_query, sqlite3_errmsg(this->sql));
-
+
return result;
}