diff options
| author | Tyge Løvset <[email protected]> | 2021-12-19 12:21:44 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-19 12:21:44 +0100 |
| commit | 92b950333c6c7002bdbf1b60af44a249dc0cef9c (patch) | |
| tree | 4b1acfcdba0bd940f829c53910587e27b5e0af90 /examples/sptr_pthread.c | |
| parent | 183a89859ba9914ee0546e4482b40be199e52292 (diff) | |
| download | STC-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/sptr_pthread.c')
| -rw-r--r-- | examples/sptr_pthread.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 <stc/csptr.h>
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;
}
|
