diff options
author | Björn Gustavsson <[email protected]> | 2013-03-06 07:40:02 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-05-31 14:52:18 +0200 |
commit | a07a97291fcac1d3132a185d0efd7b4089720d90 (patch) | |
tree | d0dcd598ffe216f304522733cec7e81439b8defd /lib/asn1/src/asn1ct_gen_per.erl | |
parent | f863775f492d31f4f38fc6e661dd6391810cfc37 (diff) | |
download | otp-a07a97291fcac1d3132a185d0efd7b4089720d90.tar.gz otp-a07a97291fcac1d3132a185d0efd7b4089720d90.tar.bz2 otp-a07a97291fcac1d3132a185d0efd7b4089720d90.zip |
PER/UPER: Remove support for a list argument for encode_open_type/1
Almost always, encode_open_type/1 is called with the return value
from complete/1, which always is a binary. In the rare situation
that encode_open_type/1 is called directly with data from the
user application, call iolist_to_binary/1 before calling
encode_open_type/1.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index ec3d7f61ce..170a3c7352 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -207,7 +207,9 @@ gen_encode_prim(Erules,D,DoTag,Value) when is_record(D,type) -> io_lib:format( "complete(enc_~s(~s))", [Tname,Value]); - _ -> Value + _ -> + io_lib:format("iolist_to_binary(~s)", + [Value]) end, call(Erules, encode_open_type, [NewValue]); #'ObjectClassFieldType'{} -> |