set: modify the previously incorrect definition of set_copy and add test for it

This commit is contained in:
Maanya Goenka
2021-08-16 15:55:51 -07:00
parent 72fba0c4e5
commit 5ef8b072e9
2 changed files with 34 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ static inline Set* set_free_free(Set *s) {
/* no set_free_free_free */
#define set_copy(s) ((Set*) _hashmap_copy(HASHMAP_BASE(h) HASHMAP_DEBUG_SRC_ARGS))
#define set_copy(s) ((Set*) _hashmap_copy(HASHMAP_BASE(s) HASHMAP_DEBUG_SRC_ARGS))
int _set_ensure_allocated(Set **s, const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS);
#define set_ensure_allocated(h, ops) _set_ensure_allocated(h, ops HASHMAP_DEBUG_SRC_ARGS)