diff options
| author | Tyge Løvset <[email protected]> | 2021-12-19 21:39:25 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-19 21:39:25 +0100 |
| commit | 0c3d711c2541aebe9a44fecb732e096bed14f72c (patch) | |
| tree | 0d9c6dbe393d24fccd12107a3ec08f468656ce73 /examples | |
| parent | 09b696eab6ae640f6c1e07178d49fcd8646e1737 (diff) | |
| download | STC-modified-0c3d711c2541aebe9a44fecb732e096bed14f72c.tar.gz STC-modified-0c3d711c2541aebe9a44fecb732e096bed14f72c.zip | |
Global rename of `_equ\b` => `_eq`. In practice `i_equ` must renamed to `i_eq` in user code if used.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rawptr_elements.c | 2 | ||||
| -rw-r--r-- | examples/vikings.c | 4 |
2 files changed, 3 insertions, 3 deletions
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 <stc/cset.h>
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 |
