aboutsummaryrefslogtreecommitdiff
path: root/src/pair.inc.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-05-02 17:58:07 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-05-02 17:58:07 +0200
commit4fe953de7b5994a896094cf0d62192559a08967d (patch)
treefa6ec5bdab5a0f1ef02d39e80c6e6ff621c87912 /src/pair.inc.h
parentChange function for creating hashtables. (diff)
downloadcalp-4fe953de7b5994a896094cf0d62192559a08967d.tar.gz
calp-4fe953de7b5994a896094cf0d62192559a08967d.tar.xz
work on porting most internal datastructures to scheme equivalents.
Diffstat (limited to 'src/pair.inc.h')
-rw-r--r--src/pair.inc.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/pair.inc.h b/src/pair.inc.h
deleted file mode 100644
index c42b2dfd..00000000
--- a/src/pair.inc.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#if ! (defined(T) && defined(V))
-#error "Both T and V must be defiend here"
-#else
-
-INIT_F(PAIR(T, V)) {
- INIT(T, &self->key);
- INIT(V, &self->val);
-
- return 0;
-}
-
-FREE_F(PAIR(T, V)) {
- FREE(T)(&self->key);
- FREE(V)(&self->val);
-
- return 0;
-}
-
-FMT_F(PAIR(T, V)) {
- char lbuf[0x100];
- char rbuf[0x1000];
- FMT(T)(&self->key, lbuf);
- FMT(V)(&self->val, rbuf);
-
- return sprintf(buf, "<%s, %s>", lbuf, rbuf);
-}
-
-int DEEP_COPY(PAIR(T, V)) (PAIR(T, V)* dest, PAIR(T, V)* src) {
- DEEP_COPY(T)(&dest->key, &src->key);
- DEEP_COPY(V)(&dest->val, &src->val);
- return 0;
-}
-
-#endif /* T & V */