summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-04-27 15:45:57 +0200
committerTyge Løvset <[email protected]>2022-04-27 15:45:57 +0200
commitdf73eddd7933df7c96269f11e37fc1a96916f747 (patch)
tree3065242a93128d4f9f7afd2e46e97c4653c3ec8f /examples
parent630c5e98558e498941212e486e1b08e8e282d3b0 (diff)
downloadSTC-modified-df73eddd7933df7c96269f11e37fc1a96916f747.tar.gz
STC-modified-df73eddd7933df7c96269f11e37fc1a96916f747.zip
Updated examples.
Diffstat (limited to 'examples')
-rw-r--r--examples/arc_demo.c2
-rw-r--r--examples/new_sptr.c6
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));