aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-03-02 12:46:37 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:17 +0200
commit53022b787c723a6c4cdf153f5705bde5fb4655ea (patch)
treeadbf876f8bd408de08ac2db5e8bdc089b8cb0fba /lib/asn1/src/asn1ct_gen_per_rt2ct.erl
parentc11b5a2ebb602c76d0957b67a0ca7741c45fea85 (diff)
downloadotp-53022b787c723a6c4cdf153f5705bde5fb4655ea.tar.gz
otp-53022b787c723a6c4cdf153f5705bde5fb4655ea.tar.bz2
otp-53022b787c723a6c4cdf153f5705bde5fb4655ea.zip
Normalize SIZE constraints to simplify backends
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per_rt2ct.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen_per_rt2ct.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
index 4eddba3150..1a16054fa0 100644
--- a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
+++ b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
@@ -139,11 +139,7 @@ emit_enc_real(Erules, Real) ->
"end"]).
emit_enc_known_multiplier_string(StringType,C,Value) ->
- SizeC =
- case get_constraint(C,'SizeConstraint') of
- L when is_list(L) -> {lists:min(L),lists:max(L)};
- L -> L
- end,
+ SizeC = effective_constraint(bitstring, C),
PAlphabC = get_constraint(C,'PermittedAlphabet'),
case {StringType,PAlphabC} of
{'UniversalString',{_,_}} ->
@@ -268,7 +264,7 @@ charbits1(NumOfChars) ->
%% copied from run time module
emit_enc_octet_string(Erules, Constraint, Value) ->
- case get_constraint(Constraint,'SizeConstraint') of
+ case effective_constraint(bitstring, Constraint) of
0 ->
emit({" []"});
1 ->