[anjuta/sdb-queries] symbol-db. class-inherit: Fixed sizeof anomalies
- From: Naba Kumar <naba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/sdb-queries] symbol-db. class-inherit: Fixed sizeof anomalies
- Date: Fri, 11 Jun 2010 18:33:07 +0000 (UTC)
commit e819f18053b5f1aba0db58dff180e2bcb71e85f7
Author: Naba Kumar <naba gnome org>
Date: Wed Jun 9 00:26:42 2010 +0300
symbol-db. class-inherit: Fixed sizeof anomalies
plugins/class-inheritance/class-inherit.c | 8 ++++----
plugins/symbol-db/symbol-db-query.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/class-inheritance/class-inherit.c b/plugins/class-inheritance/class-inherit.c
index 0a9ae52..242b021 100644
--- a/plugins/class-inheritance/class-inherit.c
+++ b/plugins/class-inheritance/class-inherit.c
@@ -1222,7 +1222,7 @@ cls_inherit_init (AnjutaClassInheritance *plugin)
IANJUTA_SYMBOL_QUERY_SEARCH_PROJECT,
NULL);
ianjuta_symbol_query_set_fields (plugin->query_project,
- sizeof (query_fields_simple),
+ sizeof (query_fields_simple)/sizeof (IAnjutaSymbolField),
query_fields_simple, NULL);
ianjuta_symbol_query_set_filters (plugin->query_project,
IANJUTA_SYMBOL_TYPE_CLASS,
@@ -1235,7 +1235,7 @@ cls_inherit_init (AnjutaClassInheritance *plugin)
IANJUTA_SYMBOL_QUERY_SEARCH_ID,
NULL);
ianjuta_symbol_query_set_fields (plugin->query_id,
- sizeof (query_fields_simple),
+ sizeof (query_fields_simple)/sizeof (IAnjutaSymbolField),
query_fields_simple, NULL);
plugin->query_members =
@@ -1243,7 +1243,7 @@ cls_inherit_init (AnjutaClassInheritance *plugin)
IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS,
NULL);
ianjuta_symbol_query_set_fields (plugin->query_members,
- sizeof (query_fields),
+ sizeof (query_fields)/sizeof (IAnjutaSymbolField),
query_fields, NULL);
plugin->query_parents =
@@ -1251,6 +1251,6 @@ cls_inherit_init (AnjutaClassInheritance *plugin)
IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS,
NULL);
ianjuta_symbol_query_set_fields (plugin->query_parents,
- sizeof (query_fields_simple),
+ sizeof (query_fields_simple)/sizeof (IAnjutaSymbolField),
query_fields_simple, NULL);
}
diff --git a/plugins/symbol-db/symbol-db-query.c b/plugins/symbol-db/symbol-db-query.c
index 9028db2..ee8f4d9 100644
--- a/plugins/symbol-db/symbol-db-query.c
+++ b/plugins/symbol-db/symbol-db-query.c
@@ -88,7 +88,7 @@ static gchar *table_joins[] =
"LEFT JOIN sym_implementation ON symbol.implementation_kind_id = sym_implementation.sym_impl_id",
"LEFT JOIN sym_access ON symbol.access_kind_id = sym_access.access_kind_id",
"LEFT JOIN sym_type ON symbol.type_id = sym_type.type_id",
- "LEFT JOIN sym_kind ON symbol.kind_id = sym_kind.sym_kind_id",
+ "LEFT JOIN sym_kind ON symbol.kind_id = sym_kind.sym_kind_id"
};
typedef struct
@@ -168,9 +168,9 @@ sdb_query_build_sql_head (SymbolDBQuery *query, GString *sql)
priv = SYMBOL_DB_QUERY (query)->priv;
g_return_if_fail (priv->fields != 0);
- /* Ensure the lookup tables in order */
- g_assert (sizeof (table_joins) == SDB_QUERY_TABLE_MAX);
- g_assert (sizeof (field_specs) == IANJUTA_SYMBOL_FIELD_END);
+ /* Ensure the lookup tables are in order */
+ g_assert (sizeof (table_joins)/sizeof (gchar*) == SDB_QUERY_TABLE_MAX);
+ g_assert (sizeof (field_specs)/sizeof (SdbQueryFieldSpec) == IANJUTA_SYMBOL_FIELD_END);
for (i = 0; i < SDB_QUERY_TABLE_MAX; i++)
tables_joined[i] = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]