Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
2d0f3894
Commit
2d0f3894
authored
Aug 02, 2013
by
Adrian Negreanu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqlite3: sometimes bindXParameter requires SQLITE_TRANSIENT
Signed-off-by:
Adrian Negreanu
<
groleo@gmail.com
>
parent
6cee7ffd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
sqlite3gen.cpp
src/sqlite3gen.cpp
+5
-5
No files found.
src/sqlite3gen.cpp
View file @
2d0f3894
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment