summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-25 15:33:13 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-25 15:33:13 -0500
commit9df83e399d7691bb20cc9d42ddb70619908aeeca (patch)
tree1a31320443ff024d14e401656f4f90ca747b7e41 /test.c
parent27acf3754529988de9d43ba0abb8e5b3bbb3da31 (diff)
passing structs to foreign functions
Diffstat (limited to 'test.c')
-rw-r--r--test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..e774509
--- /dev/null
+++ b/test.c
@@ -0,0 +1,7 @@
+typedef struct Point {
+ long x, y;
+} Point;
+
+long p(Point x) {
+ return x.x + x.y;
+}