aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorCody <cody@codyq.dev>2023-06-26 17:12:55 -0500
committerCody <cody@codyq.dev>2023-06-26 17:12:55 -0500
commit00e423d30edf38a5e57c5c1c52cdb323c62850bc (patch)
tree0c7c44cd319ee0b1a15c9b3e42813afb2a938fb1 /test.c
parent4172dc213f88df5025169fa7f43d02f2794fdd70 (diff)
downloadsloth-00e423d30edf38a5e57c5c1c52cdb323c62850bc.tar.gz
vpop & function args
Diffstat (limited to 'test.c')
-rw-r--r--test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test.c b/test.c
index c7e7f5c..988b352 100644
--- a/test.c
+++ b/test.c
@@ -7,6 +7,7 @@ typedef struct {
} IntVec;
IntVec* test();
+int testtwo(IntVec*);
int main() {
IntVec* v = test();
@@ -22,5 +23,20 @@ int main() {
int value = inner[i];
printf("%d ", value);
}
+ puts("\n\n");
+
+ testtwo(v);
+
+ size = (*v).size;
+ cap = (*v).cap;
+ inner = (*v).inner;
+
+ printf("%d\n", size);
+ printf("%d\n", cap);
+
+ for (int i = 0; i < size; ++i) {
+ int value = inner[i];
+ printf("%d ", value);
+ }
puts("\n");
}