diff options
author | Björn Gustavsson <[email protected]> | 2013-05-20 13:20:21 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-05-31 14:52:24 +0200 |
commit | 72fa58fa2d150b0e73252ad3e13853e6b644cb77 (patch) | |
tree | b263ea2785f2b0caf33934336c4ff5e905a1e78a /lib/asn1/src/asn1ct_gen_per.erl | |
parent | f15e0270a6f68e93a7e33aa9e8aed2345f74dcd8 (diff) | |
download | otp-72fa58fa2d150b0e73252ad3e13853e6b644cb77.tar.gz otp-72fa58fa2d150b0e73252ad3e13853e6b644cb77.tar.bz2 otp-72fa58fa2d150b0e73252ad3e13853e6b644cb77.zip |
asn1ct_check: Don't pass on #'ObjectClassFieldType'{} with fixed type
Simplify the backends by letting asn1ct_check replacing a
with the actual type.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index d604b9e24c..30c9ab9365 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -208,16 +208,7 @@ gen_encode_prim(Erules, #type{}=D, Value) -> io_lib:format("iolist_to_binary(~s)", [Value]) end, - call(Erules, encode_open_type, [NewValue]); - #'ObjectClassFieldType'{} -> - case asn1ct_gen:get_inner(D#type.def) of - {fixedtypevaluefield,_,InnerType} -> - gen_encode_prim(Erules, InnerType, Value); - T -> %% 'ASN1_OPEN_TYPE' - gen_encode_prim(Erules, D#type{def=T}, Value) - end; - XX -> - exit({asn1_error,nyi,XX}) + call(Erules, encode_open_type, [NewValue]) end. emit_enc_real(Erules, Real) -> @@ -1086,14 +1077,7 @@ gen_dec_imm_1('RELATIVE-OID', _Constraint, Aligned) -> gen_dec_imm_1('UTF8String', _Constraint, Aligned) -> asn1ct_imm:per_dec_restricted_string(Aligned); gen_dec_imm_1('REAL', _Constraint, Aligned) -> - asn1ct_imm:per_dec_real(Aligned); -gen_dec_imm_1(#'ObjectClassFieldType'{}=TypeName, _Constraint, Aligned) -> - case asn1ct_gen:get_inner(TypeName) of - {fixedtypevaluefield,_,#type{def=InnerType,constraint=C}} -> - gen_dec_imm_1(InnerType, C, Aligned); - #type{def=T,constraint=C} -> - gen_dec_imm_1(T, C, Aligned) - end. + asn1ct_imm:per_dec_real(Aligned). gen_dec_bit_string(F, Imm) -> D = fun(V, Buf) -> |