X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fhmap.h;h=c3cf62fa64815297ebcbb3e00a236644a3053a64;hb=5e8c1fe99924e0ebe0f33441475f8164ee20918e;hp=1592f803bedb17bd9c1ca4dc285f5bd6e72fd1c4;hpb=76e4df24d5fb92816bce123eea2d4ca2b91d95c8;p=pspp diff --git a/src/libpspp/hmap.h b/src/libpspp/hmap.h index 1592f803be..c3cf62fa64 100644 --- a/src/libpspp/hmap.h +++ b/src/libpspp/hmap.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -117,7 +117,7 @@ #include #include -#include +#include "libpspp/cast.h" /* Returns the data structure corresponding to the given NODE, assuming that NODE is embedded as the given MEMBER name in @@ -158,6 +158,7 @@ struct hmap /* Creation and destruction. */ void hmap_init (struct hmap *); void hmap_swap (struct hmap *, struct hmap *); +void hmap_clear (struct hmap *); void hmap_destroy (struct hmap *); /* Storage management. */ @@ -247,7 +248,7 @@ static inline struct hmap_node *hmap_first_nonempty_bucket__ ( static inline size_t hmap_mask_to_capacity__ (size_t mask); /* Returns the hash value associated with NODE. */ -size_t +static inline size_t hmap_node_hash (const struct hmap_node *node) { return node->hash;