aboutsummaryrefslogtreecommitdiff
path: root/macro.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-01-22 11:42:58 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-01-22 11:42:58 +0100
commitebe5c7e428b57dca758b1b3a1d8b7d4b423b19a9 (patch)
treebf97a4ba3a05c24ae1ec176f42656ce1608ee8d1 /macro.h
parentAdd very simple err header. (diff)
downloadcalp-ebe5c7e428b57dca758b1b3a1d8b7d4b423b19a9.tar.gz
calp-ebe5c7e428b57dca758b1b3a1d8b7d4b423b19a9.tar.xz
Start using trie's instead of hash-maps.
Diffstat (limited to 'macro.h')
-rw-r--r--macro.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/macro.h b/macro.h
index ca3fce24..89178cb3 100644
--- a/macro.h
+++ b/macro.h
@@ -11,6 +11,7 @@
#define TP(a, b) a ## b
#define TP3(a, b, c) a ## b ## c
#define TP4(a, b, c, d) a ## b ## c ## d
+#define TP5(a, b, c, d, e) a ## b ## c ## d ## e
/*
* Get length of __VA_ARGS__
@@ -24,12 +25,17 @@
TP3(T, _init_, ARG_COUNT)
/*
+ * TODO rename all the constructor macros to something clearer and
+ * shorter.
+ */
+
+/*
* Constructor type name
*/
-#define CONSTRUCTOR_T(T, C) TP3(T, _init_, C)
+#define CONSTRUCTOR_T(T, C) TP3(T, __init__, C)
#define CONSTRUCTOR_GEN(parent, child, C) \
- CONSTRUCTOR_T(parent ## _ ## child, C)
+ CONSTRUCTOR_T(parent ## __ ## child, C)
/*
* Returns full type of constructor