libhmap-c

C hashmap library
git clone https://git.sinitax.com/sinitax/libhmap-c
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

commit b980199ca9bcea1f9b4cdae83da0f05b375c2ad5
parent f9fcb3e2c918a1274a14501d3a85dafd23e495cb
Author: Louis Burda <quent.burda@gmail.com>
Date:   Fri, 24 Mar 2023 21:16:30 +0100

Add more types to key/value union

Diffstat:
Minclude/hmap.h | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/hmap.h b/include/hmap.h @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdbool.h> -#include <stddef.h> +#include <stdlib.h> #define HMAP_ITER(map, iter) \ hmap_iter_init(iter); hmap_iter_next(map, iter); @@ -39,10 +39,14 @@ enum { struct hmap_key { union { + bool b; char c; float f; + double d; int i; unsigned int u; + size_t s; + ssize_t ss; const void *p; void *_p; }; @@ -50,10 +54,14 @@ struct hmap_key { struct hmap_val { union { + bool b; char c; float f; + double d; int i; unsigned int u; + size_t s; + ssize_t ss; const void *p; void *_p; };