diff options
author | Björn Gustavsson <[email protected]> | 2012-12-14 21:07:39 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-22 19:20:09 +0100 |
commit | 8cc1f6e814fb4cfe69cb1f80138c630377d26b57 (patch) | |
tree | 8064a064abf7672c123f77723108f41bd7b74dc9 /lib/asn1/src/asn1ct_imm.erl | |
parent | 60e73d24cfec506b966ff789c8420bc4f466f880 (diff) | |
download | otp-8cc1f6e814fb4cfe69cb1f80138c630377d26b57.tar.gz otp-8cc1f6e814fb4cfe69cb1f80138c630377d26b57.tar.bz2 otp-8cc1f6e814fb4cfe69cb1f80138c630377d26b57.zip |
Add run-time library templates and use them
The template modules (asn1rtt_*.erl) are based on the existing
run-time modules, but with some simplifications and improvements,
for example:
The run-time functions for BER encoding took a Constraint argument which
was not used. It has been eliminated, along with the unused StringType
argument for the encode_restricted_string function.
The Range argument for decode_enumerated() has been dropped since it
was not used.
Diffstat (limited to 'lib/asn1/src/asn1ct_imm.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_imm.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index d27bea98d0..384d4a86bb 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -21,7 +21,7 @@ -export([per_dec_boolean/0,per_dec_enumerated/2,per_dec_enumerated/3, per_dec_extension_map/1, per_dec_integer/2,per_dec_length/3,per_dec_named_integer/3, - per_dec_octet_string/2,per_dec_open_type/1]). + per_dec_octet_string/2,per_dec_open_type/1,per_dec_real/1]). -export([optimize_alignment/1,optimize_alignment/2, dec_slim_cg/2,dec_code_gen/2]). -export([effective_constraint/2]). @@ -107,6 +107,14 @@ per_dec_open_type(Aligned) -> {get_bits,decode_unconstrained_length(true, Aligned), [8,binary,{align,Aligned}]}. +per_dec_real(Aligned) -> + Dec = fun(V, Buf) -> + emit(["{",{call,real_common,decode_real,[V]}, + com,Buf,"}"]) + end, + {call,Dec, + {get_bits,decode_unconstrained_length(true, Aligned), + [8,binary,{align,Aligned}]}}. %%% %%% Local functions. |