summaryrefslogtreecommitdiffhomepage
path: root/examples/rawptr_elements.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-12-19 12:21:44 +0100
committerTyge Løvset <[email protected]>2021-12-19 12:21:44 +0100
commit92b950333c6c7002bdbf1b60af44a249dc0cef9c (patch)
tree4b1acfcdba0bd940f829c53910587e27b5e0af90 /examples/rawptr_elements.c
parent183a89859ba9914ee0546e4482b40be199e52292 (diff)
downloadSTC-modified-92b950333c6c7002bdbf1b60af44a249dc0cef9c.tar.gz
STC-modified-92b950333c6c7002bdbf1b60af44a249dc0cef9c.zip
First commit for Version 3 of STC. Main changes are consistent rename of '_del' to '_drop' and '_compare' to '_cmp'.
Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind.
Diffstat (limited to 'examples/rawptr_elements.c')
-rw-r--r--examples/rawptr_elements.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rawptr_elements.c b/examples/rawptr_elements.c
index c5416822..463a7f35 100644
--- a/examples/rawptr_elements.c
+++ b/examples/rawptr_elements.c
@@ -6,7 +6,7 @@ struct { double x, y; } typedef Point;
// Set of Point pointers: define all template parameters "in-line"
// Note it may be simpler to use a cbox for this.
#define i_key Point*
-#define i_keydel(x) c_free(*(x))
+#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))
@@ -18,7 +18,7 @@ typedef int64_t inttype;
#define i_key_str
#define i_valraw inttype
#define i_val inttype*
-#define i_valdel(x) c_free(*(x))
+#define i_valdrop(x) c_free(*(x))
#define i_valfrom(raw) c_new(inttype, raw)
#define i_valto(x) **(x)
#include <stc/cmap.h>