aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/compiler/diameter_forms.hrl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2013-02-02 00:51:02 +0100
committerAnders Svensson <[email protected]>2013-02-08 19:28:47 +0100
commit2e422db2bf236fb5369cbfe54b6ccd727703b801 (patch)
tree6e9adda0f914888f7d6d692e60d266ef323db205 /lib/diameter/src/compiler/diameter_forms.hrl
parent61f9d7326380e7cf20c539e548cb4cbab2109b2a (diff)
downloadotp-2e422db2bf236fb5369cbfe54b6ccd727703b801.tar.gz
otp-2e422db2bf236fb5369cbfe54b6ccd727703b801.tar.bz2
otp-2e422db2bf236fb5369cbfe54b6ccd727703b801.zip
Add exprecs '#get-'/1 for transforming records into lists
The generated '#get-'/1 has one clause for each exported record r, whose definition is equivalent to the following. '#get-'(#r{} = Rec) -> [r | lists:zip(record_info(r, fields), tl(tuple_to_list(Rec)))]; The record name at the head of the list is the same format that diameter accepts for outgoing message.
Diffstat (limited to 'lib/diameter/src/compiler/diameter_forms.hrl')
-rw-r--r--lib/diameter/src/compiler/diameter_forms.hrl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/diameter/src/compiler/diameter_forms.hrl b/lib/diameter/src/compiler/diameter_forms.hrl
index 4cd86c32aa..1a0f3492ea 100644
--- a/lib/diameter/src/compiler/diameter_forms.hrl
+++ b/lib/diameter/src/compiler/diameter_forms.hrl
@@ -36,6 +36,7 @@
-define(clause, ?F(clause)).
-define(function, ?F(function)).
-define(call, ?F(call)).
+-define(cons, ?F(cons)).
-define('fun', ?F('fun')).
-define(generate, ?F(generate)).
-define(lc, ?F(lc)).