aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_utils.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-09-26 22:30:26 +0200
committerSverker Eriksson <[email protected]>2013-09-30 17:45:47 +0200
commit8d5b9a53a1fd5e2264d705911af23cd484ccead0 (patch)
tree9dce9d89b3c59877778756434664b76815ef0792 /erts/emulator/beam/erl_utils.h
parentd6d531012957f8e3315d44c2bcb10938ab5d6e72 (diff)
downloadotp-8d5b9a53a1fd5e2264d705911af23cd484ccead0.tar.gz
otp-8d5b9a53a1fd5e2264d705911af23cd484ccead0.tar.bz2
otp-8d5b9a53a1fd5e2264d705911af23cd484ccead0.zip
erts: Add erts_bld_tupleX macros
for compile time argument checking
Diffstat (limited to 'erts/emulator/beam/erl_utils.h')
-rw-r--r--erts/emulator/beam/erl_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_utils.h b/erts/emulator/beam/erl_utils.h
index f85c7410c4..292d135946 100644
--- a/erts/emulator/beam/erl_utils.h
+++ b/erts/emulator/beam/erl_utils.h
@@ -168,6 +168,10 @@ Eterm erts_bld_uint64(Uint **hpp, Uint *szp, Uint64 ui64);
Eterm erts_bld_sint64(Uint **hpp, Uint *szp, Sint64 si64);
Eterm erts_bld_cons(Uint **hpp, Uint *szp, Eterm car, Eterm cdr);
Eterm erts_bld_tuple(Uint **hpp, Uint *szp, Uint arity, ...);
+#define erts_bld_tuple2(H,S,E1,E2) erts_bld_tuple(H,S,2,E1,E2)
+#define erts_bld_tuple3(H,S,E1,E2,E3) erts_bld_tuple(H,S,3,E1,E2,E3)
+#define erts_bld_tuple4(H,S,E1,E2,E3,E4) erts_bld_tuple(H,S,4,E1,E2,E3,E4)
+#define erts_bld_tuple5(H,S,E1,E2,E3,E4,E5) erts_bld_tuple(H,S,5,E1,E2,E3,E4,E5)
Eterm erts_bld_tuplev(Uint **hpp, Uint *szp, Uint arity, Eterm terms[]);
Eterm erts_bld_string_n(Uint **hpp, Uint *szp, const char *str, Sint len);
#define erts_bld_string(hpp,szp,str) erts_bld_string_n(hpp,szp,str,strlen(str))