diff options
| author | Tyge Løvset <[email protected]> | 2021-11-03 11:30:06 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-11-03 11:30:06 +0100 |
| commit | e259ed7807dd9474cc94ba625db4dcd573431362 (patch) | |
| tree | 0e83bf2d49a1f0ec43f9e9b0b74c69ef4fd97a1b /examples/stack.c | |
| parent | 73b1ed7c17b94647438c7e73738bf0820e5d57ad (diff) | |
| download | STC-modified-e259ed7807dd9474cc94ba625db4dcd573431362.tar.gz STC-modified-e259ed7807dd9474cc94ba625db4dcd573431362.zip | |
Changed container_X_get() and container_X_at() to return const value* (or const mapped*). Added container_X_getmut() for mutable version. Updated docs.
Diffstat (limited to 'examples/stack.c')
| -rw-r--r-- | examples/stack.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/stack.c b/examples/stack.c index 54d5aeed..dac0112e 100644 --- a/examples/stack.c +++ b/examples/stack.c @@ -11,9 +11,8 @@ #include <stc/cstack.h>
int main() {
- cstack_i stack = cstack_i_init();
- cstack_c chars = cstack_c_init();
- c_autodefer (cstack_i_del(&stack), cstack_c_del(&chars))
+ c_auto (cstack_i, stack)
+ c_auto (cstack_c, chars)
{
c_forrange (i, int, 101)
cstack_i_push(&stack, i*i);
|
