summaryrefslogtreecommitdiff
path: root/src/struct.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2014-12-20 15:32:50 -0500
committerAdrian Thurston <thurston@complang.org>2014-12-20 15:32:50 -0500
commit286f1c6ea023cd993cf4e6a0d5d0529a3422a62e (patch)
tree322e6c1f2f83b820fb71519a8051cbf404edf807 /src/struct.h
parent67390d6e23bd4025a0025574d942d63c99006f57 (diff)
downloadcolm-286f1c6ea023cd993cf4e6a0d5d0529a3422a62e.tar.gz
can get/set vals in structs
Diffstat (limited to 'src/struct.h')
-rw-r--r--src/struct.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/struct.h b/src/struct.h
new file mode 100644
index 00000000..ddf2081e
--- /dev/null
+++ b/src/struct.h
@@ -0,0 +1,5 @@
+#ifndef _COLM_STRUCT_H
+
+#define colm_struct_val(obj, field) ((Tree**)(((HeapItem*)obj)+1))[field]
+
+#endif