+2013-10-02 Joel Brobecker <brobecker@adacore.com>
+
+ * symtab.c (search_symbols_equal): Delete.
+ (sort_search_symbols_remove_dups): Replace call to
+ search_symbols_equal by call to compare_search_syms,
+ adjusting as necessary.
+
2013-10-02 Phil Muldoon <pmuldoon@redhat.com>
PR python/15579
SYMBOL_PRINT_NAME (sym_b->symbol));
}
-/* Helper function for sort_search_symbols_remove_dups.
- Return TRUE if symbols A, B are equal. */
-
-static int
-search_symbols_equal (const struct symbol_search *a,
- const struct symbol_search *b)
-{
- return (strcmp (a->symtab->filename, b->symtab->filename) == 0
- && a->block == b->block
- && strcmp (SYMBOL_PRINT_NAME (a->symbol),
- SYMBOL_PRINT_NAME (b->symbol)) == 0);
-}
-
/* Sort the NFOUND symbols in list FOUND and remove duplicates.
The duplicates are freed, and the new list is returned in
*NEW_HEAD, *NEW_TAIL. */
/* Collapse out the dups. */
for (i = 1, j = 1; i < nfound; ++i)
{
- if (! search_symbols_equal (symbols[j - 1], symbols[i]))
+ if (compare_search_syms (&symbols[j - 1], &symbols[i]) != 0)
symbols[j++] = symbols[i];
else
xfree (symbols[i]);