aboutsummaryrefslogtreecommitdiff
path: root/macro.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-02-22 14:39:34 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-02-22 14:39:34 +0100
commita608b90f8c146430803871e20d043b60a278248b (patch)
tree194e6e80cd5403cc64d1e4915f9be45a462d3918 /macro.h
parentstrbuf (diff)
downloadcalp-a608b90f8c146430803871e20d043b60a278248b.tar.gz
calp-a608b90f8c146430803871e20d043b60a278248b.tar.xz
rest
Diffstat (limited to 'macro.h')
-rw-r--r--macro.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/macro.h b/macro.h
index ea687bbf..785d4fe0 100644
--- a/macro.h
+++ b/macro.h
@@ -9,6 +9,7 @@
#define TP4(a, b, c, d) a ## b ## c ## d
#define TP5(a, b, c, d, e) a ## b ## c ## d ## e
#define TP6(a, b, c, d, e, f) a ## b ## c ## d ## e ## f
+#define TP7(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g
/*
* Get length of __VA_ARGS__
@@ -31,10 +32,11 @@
*
* nameᐸTᐳ
*/
-#define TEMPL(name, T) TP4(name, \U00001438 , T, \U00001433 )
-#define TEMPL2(name, T, V) TP6(name, \U00001438\U00001438 , T , \U00001433_\U00001438 , V, \U00001433\U00001433)
+#define TEMPL(name, T) TP5(DEP_, name, \U00001438 , T, \U00001433 )
+#define TEMPL2(name, T, V) TP7(DEP_, name, \U00001438\U00001438 , T , \U00001433_\U00001438 , V, \U00001433\U00001433)
#define TEMPL_N(name, T, argcount) TP6(name, \U00001438 , T, _, argcount, \U00001433 )
+#if 1
/* Constructor type name */
#define __INIT_T(T, C) TEMPL_N(init, T, C)
@@ -77,6 +79,7 @@
/* Declare destructor */
#define FREE_F(T) int FREE(T) (T* self)
+#endif
/* generate reusable internal symbol */
#define __INTER(s) TP3(__, s, __internal)