Skip to content
Snippets Groups Projects
Commit 483d7cf4 authored by DJ Delorie's avatar DJ Delorie
Browse files

merge from gcc

parent 102fd3cc
No related branches found
No related tags found
No related merge requests found
2009-06-21 Jakub Jelinek <jakub@redhat.com>
* hashtab.c (htab_traverse): Don't call htab_expand for
nearly empty hashtabs with sizes 7, 13 or 31.
2009-06-16 Nick Clifton <nickc@redhat.com> 2009-06-16 Nick Clifton <nickc@redhat.com>
PR 10197 PR 10197
......
/* An expandable hash tables datatype. /* An expandable hash tables datatype.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com). Contributed by Vladimir Makarov (vmakarov@cygnus.com).
...@@ -759,7 +759,8 @@ htab_traverse_noresize (htab_t htab, htab_trav callback, PTR info) ...@@ -759,7 +759,8 @@ htab_traverse_noresize (htab_t htab, htab_trav callback, PTR info)
void void
htab_traverse (htab_t htab, htab_trav callback, PTR info) htab_traverse (htab_t htab, htab_trav callback, PTR info)
{ {
if (htab_elements (htab) * 8 < htab_size (htab)) size_t size = htab_size (htab);
if (htab_elements (htab) * 8 < size && size > 32)
htab_expand (htab); htab_expand (htab);
htab_traverse_noresize (htab, callback, info); htab_traverse_noresize (htab, callback, info);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment