Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- include/lib/hash-map.h | 1 + lib/hash-map.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/include/lib/hash-map.h b/include/lib/hash-map.h index bb5d399..f4826b1 100644 --- a/include/lib/hash-map.h +++ b/include/lib/hash-map.h @@ -25,6 +25,7 @@ void free_hash_map(struct hash_map *map); int hash_map_put(struct hash_map *map, const void *key, void *value); int hash_map_get(struct hash_map *map, const void *key, void **value_p); int hash_map_remove(struct hash_map *map, const void *key); +bool hash_map_contains(struct hash_map *map, const void *key); hash_fn string_hash; compare_fn string_compare; diff --git a/lib/hash-map.c b/lib/hash-map.c index a50fcd6..28df5d8 100644 --- a/lib/hash-map.c +++ b/lib/hash-map.c @@ -123,6 +123,11 @@ int hash_map_remove(struct hash_map *map, const void *key) return 0; } +bool hash_map_contains(struct hash_map *map, const void *key) +{ + return hash_map_lookup_entry(map, key) != NULL; +} + unsigned long string_hash(const void *key, unsigned long size) { unsigned long hash; -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel