summaryrefslogtreecommitdiffhomepage
path: root/examples/sptr_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sptr_pthread.c')
-rw-r--r--examples/sptr_pthread.c7
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;
}