[anjuta] symbol-db: fixed scope_definition_id creation.
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: fixed scope_definition_id creation.
- Date: Sun, 11 Mar 2012 12:06:59 +0000 (UTC)
commit 7cfd473b7753e150d6764176651793d42677f78f
Author: Massimo Corà <mcora src gnome org>
Date: Sun Mar 11 12:55:59 2012 +0100
symbol-db: fixed scope_definition_id creation.
If a scope already existed then the retrieved value was -1, which was wrong.
plugins/symbol-db/symbol-db-engine-core.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index 7e1b51a..bffed50 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -3979,7 +3979,7 @@ sdb_engine_add_new_heritage (SymbolDBEngine * dbe, gint base_symbol_id,
g_warning ("Error adding heritage");
}
}
-
+
/* ### Thread note: this function inherits the mutex lock ### */
static GNUC_INLINE gint
@@ -4036,7 +4036,13 @@ sdb_engine_add_new_scope_definition (SymbolDBEngine * dbe, const tagEntry * tag_
(GdaSet*)plist, &last_inserted,
NULL) == -1)
{
- table_id = -1;
+
+ GValue v = {0, };
+ SDB_GVALUE_SET_STATIC_STRING(v, scope);
+
+ /* try to get an already existing scope */
+ table_id = sdb_engine_get_tuple_id_by_unique_name (dbe, PREP_QUERY_GET_SCOPE_ID,
+ "scope", &v);
}
else
{
@@ -4222,6 +4228,7 @@ sdb_engine_second_pass_update_scope_1 (SymbolDBEngine * dbe,
if (free_token_name)
g_free (token_name);
+ g_free (object_name);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]