From df73eddd7933df7c96269f11e37fc1a96916f747 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 27 Apr 2022 15:45:57 +0200 Subject: Updated examples. --- examples/arc_demo.c | 2 +- examples/new_sptr.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/arc_demo.c b/examples/arc_demo.c index 132e940a..a55c868e 100644 --- a/examples/arc_demo.c +++ b/examples/arc_demo.c @@ -26,7 +26,7 @@ int main() { const int years[] = {2021, 2012, 2022, 2015}; c_forrange (i, c_arraylen(years)) - cvec_Arc_push_back(&vec, Arc_make(years[i])); + cvec_Arc_push_back(&vec, Arc_from(years[i])); printf("vec:"); c_foreach (i, cvec_Arc, vec) printf(" %d", *i.ref->get); diff --git a/examples/new_sptr.c b/examples/new_sptr.c index f037c0a8..4f80c478 100644 --- a/examples/new_sptr.c +++ b/examples/new_sptr.c @@ -43,9 +43,9 @@ int main(void) { c_auto (cstack_iptr, stk) { puts("Ex2"); - cstack_iptr_push(&stk, SPtr_make(10)); - cstack_iptr_push(&stk, SPtr_make(20)); - cstack_iptr_push(&stk, SPtr_make(30)); + cstack_iptr_push(&stk, SPtr_from(10)); + cstack_iptr_push(&stk, SPtr_from(20)); + cstack_iptr_push(&stk, SPtr_from(30)); cstack_iptr_push(&stk, SPtr_clone(*cstack_iptr_top(&stk))); cstack_iptr_push(&stk, SPtr_clone(*cstack_iptr_begin(&stk).ref)); -- cgit v1.2.3