proper order of api calls in sqlite - #refs 872

This commit is contained in:
Dane Springmeyer 2011-09-13 00:00:35 +00:00
parent 91565b7f7a
commit 436df62f3b

View file

@ -98,8 +98,9 @@ public:
const char* column_text (int col, int& len) const char* column_text (int col, int& len)
{ {
const char* text = (const char*) sqlite3_column_text (stmt_, col);
len = sqlite3_column_bytes (stmt_, col); len = sqlite3_column_bytes (stmt_, col);
return (const char*) sqlite3_column_text (stmt_, col); return text;
} }
const char* column_text (int col) const char* column_text (int col)
@ -109,8 +110,9 @@ public:
const void* column_blob (int col, int& bytes) const void* column_blob (int col, int& bytes)
{ {
const char* blob = (const char*) sqlite3_column_blob (stmt_, col);
bytes = sqlite3_column_bytes (stmt_, col); bytes = sqlite3_column_bytes (stmt_, col);
return sqlite3_column_blob (stmt_, col); return blob;
} }
sqlite3_stmt* get_statement() sqlite3_stmt* get_statement()