aboutsummaryrefslogtreecommitdiff
path: root/src/pair.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-22 20:11:11 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-22 20:17:52 +0100
commitd46183860c1f3f10095e95023adcb79b1896ab0e (patch)
treedd331a0efe9777bfe84160139da1e39df3226b71 /src/pair.h
parentAdd stuff to test.scm. (diff)
downloadcalp-d46183860c1f3f10095e95023adcb79b1896ab0e.tar.gz
calp-d46183860c1f3f10095e95023adcb79b1896ab0e.tar.xz
Move C and Scheme code into subdirs.
Diffstat (limited to 'src/pair.h')
-rw-r--r--src/pair.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/pair.h b/src/pair.h
new file mode 100644
index 00000000..e96cf180
--- /dev/null
+++ b/src/pair.h
@@ -0,0 +1,19 @@
+#ifndef PAIR_H
+#define PAIR_H
+
+#define PAIR(T, V) TEMPL2(pair, T, V)
+
+#endif /* PAIR_H */
+#if defined(T) && defined(V)
+
+typedef struct {
+ T key;
+ V val;
+} PAIR(T, V);
+
+INIT_F(PAIR(T, V));
+FREE_F(PAIR(T, V));
+FMT_F(PAIR(T, V));
+int DEEP_COPY(PAIR(T, V)) (PAIR(T, V)* dest, PAIR(T, V)* src);
+
+#endif