summaryrefslogtreecommitdiff
path: root/gobject-introspection
diff options
context:
space:
mode:
Diffstat (limited to 'gobject-introspection')
-rw-r--r--gobject-introspection/scanner.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gobject-introspection/scanner.c b/gobject-introspection/scanner.c
index 01fe0f744..2feb5eac6 100644
--- a/gobject-introspection/scanner.c
+++ b/gobject-introspection/scanner.c
@@ -1186,6 +1186,7 @@ g_igenerator_add_symbol (GIGenerator * igenerator, CSymbol * symbol)
{
/* only add symbols of main file */
gboolean found_filename = FALSE;
+
GList *l;
for (l = igenerator->filenames; l != NULL; l = l->next)
{
@@ -1199,6 +1200,16 @@ g_igenerator_add_symbol (GIGenerator * igenerator, CSymbol * symbol)
symbol->directives = g_slist_reverse (igenerator->directives);
igenerator->directives = NULL;
+ /* that's not very optimized ! */
+ for (l = igenerator->symbol_list; l != NULL; l = l->next)
+ {
+ if (g_str_equal (((CSymbol*)l->data)->ident, symbol->ident))
+ {
+ g_printerr ("Dropping %s duplicate\n", symbol->ident);
+ return;
+ }
+ }
+
if (found_filename || igenerator->macro_scan)
{
igenerator->symbol_list =