From 8234a9875b7acdbe804127d7d645c5db09c94618 Mon Sep 17 00:00:00 2001 From: vivek Date: Sun, 14 May 2017 22:17:45 -0700 Subject: [PATCH] lib: Macro for number of entries in hash table Signed-off-by: Vivek Venkatraman --- lib/hash.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/hash.h b/lib/hash.h index bafb35a2a3..319ba9f7f9 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -66,6 +66,8 @@ struct hash unsigned long count; }; +#define hashcount(X) ((X)->count) + extern struct hash *hash_create (unsigned int (*) (void *), int (*) (const void *, const void *)); extern struct hash *hash_create_size (unsigned int, unsigned int (*) (void *), -- 2.39.5