diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-04-04 09:27:30 +0200 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-04-04 09:27:30 +0200 |
| commit | 430505df6390c18fcd7e01055bf325c2c66e86cb (patch) | |
| tree | e61b96ca7c7b853c25ef9c20260cd6e8198228b0 /cheesemap.h | |
| parent | dd35a08384c0ab2408b39a933acbca535021ebe5 (diff) | |
fix construct to new
Diffstat (limited to 'cheesemap.h')
| -rw-r--r-- | cheesemap.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cheesemap.h b/cheesemap.h index 0241fb1..f7353d1 100644 --- a/cheesemap.h +++ b/cheesemap.h @@ -107,7 +107,7 @@ struct cm_type { cm_usize entry_size; }; -#define cm_type_construct(key_size, value_size, value_offset, entry_size) \ +#define cm_type_new(key_size, value_size, value_offset, entry_size) \ ((struct cm_type){key_size, value_size, value_offset, entry_size}) struct cheesemap_raw { @@ -124,11 +124,10 @@ struct cheesemap_raw { #define cm_raw_new() \ ((struct cheesemap_raw){.ctrl = (cm_u8*)CM_CTRL_STATIC_EMPTY}) -bool cm_raw_new_with(struct cheesemap_raw* map, cm_alloc_fn alloc, - cm_u8* user, const struct cm_type* type, - cm_usize initial_capacity); -void cm_raw_drop(struct cheesemap_raw* map, cm_dealloc_fn dealloc, - cm_u8* user, const struct cm_type* type); +bool cm_raw_new_with(struct cheesemap_raw* map, cm_alloc_fn alloc, cm_u8* user, + const struct cm_type* type, cm_usize initial_capacity); +void cm_raw_drop(struct cheesemap_raw* map, cm_dealloc_fn dealloc, cm_u8* user, + const struct cm_type* type); bool cm_raw_reserve(struct cheesemap_raw* map, cm_hash_fn hash, cm_alloc_fn alloc, cm_dealloc_fn dealloc, cm_u8* user, const struct cm_type* type, cm_usize additional); @@ -159,7 +158,7 @@ struct cheesemap { struct cheesemap_raw raw; }; -#define cm_construct(type, user, hash, compare, alloc, dealloc, raw) \ +#define cm_new_raw(type, user, hash, compare, alloc, dealloc, raw) \ ((struct cheesemap){type, user, hash, compare, alloc, dealloc, raw}) void cm_new(struct cheesemap* map, cm_usize key_size, cm_usize key_align, |
