aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen.erl
diff options
context:
space:
mode:
authorGustav Simonsson <[email protected]>2012-07-11 11:50:46 +0200
committerGustav Simonsson <[email protected]>2012-07-11 11:50:46 +0200
commit7a70f331e65e831585afa195bf29ef7d823e55f6 (patch)
treec4865debd6088f96a2838c455548a0b59e9a29d1 /lib/asn1/src/asn1ct_gen.erl
parenteac9c3494ce4d684b09779f075317e8943a7928b (diff)
downloadotp-7a70f331e65e831585afa195bf29ef7d823e55f6.tar.gz
otp-7a70f331e65e831585afa195bf29ef7d823e55f6.tar.bz2
otp-7a70f331e65e831585afa195bf29ef7d823e55f6.zip
Make n2n option work for enumerated types without extension
markers. Add test enumeration types for testing n2n option when using the name2num and num2name functions on an enumeration value not in the extension root of an enumeration type with extension marker.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl
index fda4e1c6d9..06c1b63e0a 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -133,6 +133,9 @@ pgen_n2nconversion(_Erules,#typedef{name=TypeName,typespec=#type{def={'ENUMERATE
NN = NN1 ++ NN2,
pgen_name2numfunc(TypeName,NN),
pgen_num2namefunc(TypeName,NN);
+pgen_n2nconversion(_Erules,#typedef{name=TypeName,typespec=#type{def={'ENUMERATED',NN}}}) ->
+ pgen_name2numfunc(TypeName,NN),
+ pgen_num2namefunc(TypeName,NN);
pgen_n2nconversion(_Erules,_) ->
true.