From: Michael Beck Date: Thu, 3 Jul 2008 16:09:08 +0000 (+0000) Subject: allow derived hashsets to have an own resize X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=cae46663ef6ed04e3d08598e1b6dd6f84cb7981b;p=libfirm allow derived hashsets to have an own resize [r20330] --- diff --git a/ir/adt/hashset.c b/ir/adt/hashset.c index 3073989df..d159c7d6f 100644 --- a/ir/adt/hashset.c +++ b/ir/adt/hashset.c @@ -321,6 +321,7 @@ void reset_thresholds(HashSet *self) self->consider_shrink = 0; } +#ifndef HAVE_OWN_RESIZE /** * Resize the hashset * @internal @@ -359,6 +360,12 @@ void resize(HashSet *self, size_t new_size) /* now we can free the old array */ Free(old_entries); } +#else + +/* resize must be defined outside */ +static void resize(HashSet *self, size_t new_size); + +#endif /** * grow the hashset if adding 1 more elements would make it too crowded