summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/rawptr_elements.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-08 16:16:49 +0100
committerTyge Løvset <[email protected]>2023-02-08 17:18:24 +0100
commitc4441f5fc665194fbd7a894a67a64a08c3beac42 (patch)
tree82f231b6e8fcb75625166f98aa785baaa265a3d6 /misc/examples/rawptr_elements.c
parent673dd5319a488d4b702b94dd9aeda4e497ae4fbc (diff)
downloadSTC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.tar.gz
STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.zip
Changed to use lowercase flow-control macros in examples (uppercase will still be supported). Improved many examples to use c_make() to init containers.
Diffstat (limited to 'misc/examples/rawptr_elements.c')
-rw-r--r--misc/examples/rawptr_elements.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/rawptr_elements.c b/misc/examples/rawptr_elements.c
index 6fb9208c..4b3d2056 100644
--- a/misc/examples/rawptr_elements.c
+++ b/misc/examples/rawptr_elements.c
@@ -28,8 +28,8 @@ typedef int64_t inttype;
int main()
{
- c_AUTO (SIPtrMap, map, m1)
- c_AUTO (SIBoxMap, m2)
+ c_auto (SIPtrMap, map, m1)
+ c_auto (SIBoxMap, m2)
{
printf("\nMap with pointer elements:\n");
SIPtrMap_insert(&map, cstr_from("testing"), c_new(inttype, 1));
@@ -41,14 +41,14 @@ int main()
m1 = SIPtrMap_clone(map);
- c_FORPAIR (name, number, SIPtrMap, m1)
+ c_forpair (name, number, SIPtrMap, m1)
printf("%s: %" PRId64 "\n", cstr_str(_.name), **_.number);
puts("\nIBox map:");
SIBoxMap_insert(&m2, cstr_from("Hello"), IBox_make(123));
SIBoxMap_emplace(&m2, "World", 999);
- c_FORPAIR (name, number, SIBoxMap, m2)
+ c_forpair (name, number, SIBoxMap, m2)
printf("%s: %d\n", cstr_str(_.name), *_.number->get);
puts("");
}