diff options
author | Anders Svensson <[email protected]> | 2011-10-14 01:44:58 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-10-17 12:26:46 +0200 |
commit | c03ac3db1d90e2b86ac4acfd6f0d09a324be4a42 (patch) | |
tree | 16b5eeef77edb78c01cb88d937b8257f7ecd7396 /lib/diameter/src/compiler/diameter_spec_util.erl | |
parent | 7f6d6349514a62fa7a66dae9b01a8e5f364826fb (diff) | |
download | otp-c03ac3db1d90e2b86ac4acfd6f0d09a324be4a42.tar.gz otp-c03ac3db1d90e2b86ac4acfd6f0d09a324be4a42.tar.bz2 otp-c03ac3db1d90e2b86ac4acfd6f0d09a324be4a42.zip |
@result_code -> @define in dictionary files
The section simply results in generated macros and has nothing
specifically to do with result codes. It's still not documented,
and neither are the macros generated from @enum, since the generated
names are typically so long as to be impractical/unreadable in source.
Better to use numeric values with a comment or define your own
shorter macros as the need arises.
Diffstat (limited to 'lib/diameter/src/compiler/diameter_spec_util.erl')
-rw-r--r-- | lib/diameter/src/compiler/diameter_spec_util.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/diameter/src/compiler/diameter_spec_util.erl b/lib/diameter/src/compiler/diameter_spec_util.erl index b60886b678..e9221ed00a 100644 --- a/lib/diameter/src/compiler/diameter_spec_util.erl +++ b/lib/diameter/src/compiler/diameter_spec_util.erl @@ -204,9 +204,11 @@ chunk({avp_vendor_id = T, [{number, I}], Body}, Dict) -> chunk({enum, [N], Str}, Dict) -> append(enums, {atomize(N), parse_enums(Str)}, Dict); -%% result_codes -> [{ResultName, [{Value, Name}, ...]}, ...] -chunk({result_code, [N], Str}, Dict) -> - append(result_codes, {atomize(N), parse_enums(Str)}, Dict); +%% defines -> [{DefineName, [{Value, Name}, ...]}, ...] +chunk({define, [N], Str}, Dict) -> + append(defines, {atomize(N), parse_enums(Str)}, Dict); +chunk({result_code, [_] = N, Str}, Dict) -> %% backwards compatibility + chunk({define, N, Str}, Dict); %% commands -> [{Name, Abbrev}, ...] chunk({commands = T, [], Body}, Dict) -> |