From 0c3d711c2541aebe9a44fecb732e096bed14f72c Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 19 Dec 2021 21:39:25 +0100 Subject: Global rename of `_equ\b` => `_eq`. In practice `i_equ` must renamed to `i_eq` in user code if used. --- examples/rawptr_elements.c | 2 +- examples/vikings.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/rawptr_elements.c b/examples/rawptr_elements.c index 463a7f35..3ff0dc8a 100644 --- a/examples/rawptr_elements.c +++ b/examples/rawptr_elements.c @@ -9,7 +9,7 @@ struct { double x, y; } typedef Point; #define i_keydrop(x) c_free(*(x)) #define i_keyfrom(x) c_new(Point, *(x)) #define i_hash(x, n) c_default_hash(*(x), sizeof *(x)) -#define i_equ(x, y) c_memcmp_equalto(*(x), *(y)) +#define i_eq(x, y) c_memcmp_eq(*(x), *(y)) #define i_tag pnt #include diff --git a/examples/vikings.c b/examples/vikings.c index 838598b5..c4e86c73 100644 --- a/examples/vikings.c +++ b/examples/vikings.c @@ -22,7 +22,7 @@ uint64_t RViking_hash(const RViking* raw, size_t ignore) { uint64_t hash = c_strhash(raw->name) ^ (c_strhash(raw->country) >> 15); return hash; } -static inline bool RViking_equalto(const RViking* rx, const RViking* ry) { +static inline bool RViking_eq(const RViking* rx, const RViking* ry) { return strcmp(rx->name, ry->name) == 0 && strcmp(rx->country, ry->country) == 0; } @@ -40,7 +40,7 @@ static inline RViking Viking_toraw(const Viking* vk) { #define i_val int // i_key_bind auto-binds these functions: // #define i_hash Viking_hash -// #define i_equ Viking_equalto +// #define i_eq Viking_eq // #define i_keyfrom Viking_from // uses _from (not _clone) because i_keyraw is defined // #define i_keyto Viking_toraw // #define i_keydrop Viking_drop -- cgit v1.2.3