From 92b950333c6c7002bdbf1b60af44a249dc0cef9c Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 19 Dec 2021 12:21:44 +0100 Subject: 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. --- examples/sptr_pthread.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/sptr_pthread.c') diff --git a/examples/sptr_pthread.c b/examples/sptr_pthread.c index cfb845b6..501fdcef 100644 --- a/examples/sptr_pthread.c +++ b/examples/sptr_pthread.c @@ -11,11 +11,10 @@ struct Base int value; } typedef Base; -void Base_del(Base* b) { printf("Base::~Base()\n"); } - #define i_val Base -#define i_del Base_del +#define i_drop(x) printf("Base::~Base()\n") #define i_tag base +#define i_opt c_no_cmp #include void* thr(csptr_base* lp) @@ -28,7 +27,7 @@ void* thr(csptr_base* lp) " p.get() = %p, p.use_count() = %ld\n", (void*)lp->get, *lp->use_count); } /* atomically decrease ref. */ - csptr_base_del(lp); + csptr_base_drop(lp); return NULL; } -- cgit v1.2.3