1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 00:56:37 +02:00

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.

This commit is contained in:
Naram Qashat
2011-10-24 16:32:29 -04:00
parent d0513d6506
commit 377a7a968b
24 changed files with 221 additions and 298 deletions
+4 -4
View File
@@ -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;
}