From cac106defc5060c5e485480e8003b992482d751d Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sun, 11 Jun 2017 09:33:42 +0200 Subject: Change signature associated with dictionary @custom_type/@codecs To pass the options map through the encode. This is not backwards compatible, and dictionaries supporting @custom_types or @codecs will need to be updated. --- lib/diameter/src/compiler/diameter_codegen.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/diameter/src/compiler') diff --git a/lib/diameter/src/compiler/diameter_codegen.erl b/lib/diameter/src/compiler/diameter_codegen.erl index b6fc78b6cc..5a1e3ba941 100644 --- a/lib/diameter/src/compiler/diameter_codegen.erl +++ b/lib/diameter/src/compiler/diameter_codegen.erl @@ -568,11 +568,12 @@ cs_custom_avp({Mod, Key, Avps}, Dict) -> c_custom_avp(Mod, Key, AvpName, Type) -> {F,A} = custom(Key, AvpName, Type), - {?clause, [?VAR('T'), ?VAR('Data'), ?Atom(AvpName), ?VAR('_')], + {?clause, [?VAR('T'), ?VAR('Data'), ?Atom(AvpName), ?VAR('Opts')], [], [?APPLY(?A(Mod), ?A(F), [?VAR('T'), ?Atom(A), - ?VAR('Data')])]}. + ?VAR('Data'), + ?VAR('Opts')])]}. custom(custom_types, AvpName, Type) -> {AvpName, Type}; -- cgit v1.2.3