summaryrefslogtreecommitdiffstats
path: root/src/sqlite3gen.cpp
diff options
context:
space:
mode:
authorAdrian Negreanu <groleo@gmail.com>2013-08-02 20:02:46 (GMT)
committerAdrian Negreanu <groleo@gmail.com>2013-08-03 12:46:45 (GMT)
commit2d0f38944eb5e683e21a6b988aab246a723ac11f (patch)
treef4fddcb7e39cde12cfd933b8285447aeec47b245 /src/sqlite3gen.cpp
parent6cee7ffd0432f4ee4e35ef972015035664363d04 (diff)
downloadDoxygen-2d0f38944eb5e683e21a6b988aab246a723ac11f.zip
Doxygen-2d0f38944eb5e683e21a6b988aab246a723ac11f.tar.gz
Doxygen-2d0f38944eb5e683e21a6b988aab246a723ac11f.tar.bz2
sqlite3: sometimes bindXParameter requires SQLITE_TRANSIENT
Signed-off-by: Adrian Negreanu <groleo@gmail.com>
Diffstat (limited to 'src/sqlite3gen.cpp')
-rw-r--r--src/sqlite3gen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index c4b32fe..6f67ec4 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -241,10 +241,10 @@ class TextGeneratorSqlite3Impl : public TextGeneratorIntf
static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def);
-static void bindTextParameter(sqlite3_stmt *stmt,const char *name,const char *value)
+static void bindTextParameter(sqlite3_stmt *stmt,const char *name,const char *value, bool _static=TRUE)
{
int idx = sqlite3_bind_parameter_index(stmt, name);
- sqlite3_bind_text(stmt, idx, value, -1, SQLITE_STATIC);
+ sqlite3_bind_text(stmt, idx, value, -1, _static==TRUE?SQLITE_STATIC:SQLITE_TRANSIENT);
}
static void bindIntParameter(sqlite3_stmt *stmt,const char *name,int value)
@@ -621,7 +621,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
//if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
QCString memType;
// memberdef
- bindTextParameter(i_s_memberdef,":refid",md->anchor());
+ bindTextParameter(i_s_memberdef,":refid",md->anchor().data(),FALSE);
bindIntParameter(i_s_memberdef,":kind",md->memberType());
bindIntParameter(i_s_memberdef,":prot",md->protection());
bindIntParameter(i_s_memberdef,":static",md->isStatic());
@@ -696,7 +696,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,typeStr);
if (typeStr.data())
{
- bindTextParameter(i_s_memberdef,":type",typeStr);
+ bindTextParameter(i_s_memberdef,":type",typeStr.data(),FALSE);
}
if (md->definition())
@@ -819,7 +819,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
if ( md->getScopeString() )
{
- bindTextParameter(i_s_memberdef,":scope",md->getScopeString());
+ bindTextParameter(i_s_memberdef,":scope",md->getScopeString().data(),FALSE);
}
// File location