if (val)
*str = strdup(val);
}
+
+void _save_column_bool(sqlite3_stmt *stmt, int idx, bool *bool_value)
+{
+ const char *val;
+
+ val = (const char *)sqlite3_column_text(stmt, idx);
+ if (!val)
+ return;
+
+ if (strcasecmp(val, "true") == 0)
+ *bool_value = true;
+ else if (strcasecmp(val, "false") == 0)
+ *bool_value = false;
+}