diff options
author | Björn Gustavsson <[email protected]> | 2012-11-12 14:26:46 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-11-22 17:23:12 +0100 |
commit | 3d8455a53e1980c82cf329c9bbe01ce51c17248b (patch) | |
tree | d998f2c9cc81d248f971916cae5089b0c1705a04 /lib/asn1/src/asn1ct_gen_ber.erl | |
parent | 3945f3daaf9fb0038e9aacae1b11275a1e05b649 (diff) | |
download | otp-3d8455a53e1980c82cf329c9bbe01ce51c17248b.tar.gz otp-3d8455a53e1980c82cf329c9bbe01ce51c17248b.tar.bz2 otp-3d8455a53e1980c82cf329c9bbe01ce51c17248b.zip |
Remove the obsolete and deprecated 'keyed_list' option
The 'keyed_list' was only supported for the 'ber' and 'ber_bin'
backends and has been undocumented for a long time. Also remove
the note in the documentation about the feature.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_ber.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_ber.erl | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/lib/asn1/src/asn1ct_gen_ber.erl b/lib/asn1/src/asn1ct_gen_ber.erl index 491ebcb8fd..b54b9febe5 100644 --- a/lib/asn1/src/asn1ct_gen_ber.erl +++ b/lib/asn1/src/asn1ct_gen_ber.erl @@ -106,22 +106,7 @@ gen_encode(Erules,Typename,Type) when is_record(Type,type) -> emit([nl,"%%================================",nl]), case lists:member(InnerType,['SET','SEQUENCE']) of true -> - case get(asn_keyed_list) of - true -> - CompList = - case Type#type.def of - #'SEQUENCE'{components=Cl} -> Cl; - #'SET'{components=Cl} -> Cl - end, - emit([nl,"'enc_",asn1ct_gen:list2name(Typename), - "'(Val, TagIn",ObjFun, - ") when is_list(Val) ->",nl]), - emit([" 'enc_",asn1ct_gen:list2name(Typename), - "'(?RT_BER:fixoptionals(", - {asis,optionals(CompList)}, - ",Val), TagIn",ObjFun,");",nl,nl]); - _ -> true - end; + true; _ -> emit([nl,"'enc_",asn1ct_gen:list2name(Typename), "'({'",asn1ct_gen:list2name(Typename), @@ -160,22 +145,7 @@ gen_encode_user(Erules,D) when is_record(D,typedef) -> emit([nl,"%%================================",nl]), case lists:member(InnerType,['SET','SEQUENCE']) of true -> - case get(asn_keyed_list) of - true -> - CompList = - case Type#type.def of - #'SEQUENCE'{components=Cl} -> Cl; - #'SET'{components=Cl} -> Cl - end, - - emit([nl,"'enc_",asn1ct_gen:list2name(Typename), - "'(Val, TagIn) when is_list(Val) ->",nl]), - emit([" 'enc_",asn1ct_gen:list2name(Typename), - "'(?RT_BER:fixoptionals(", - {asis,optionals(CompList)}, - ",Val), TagIn);",nl,nl]); - _ -> true - end; + true; _ -> emit({nl,"'enc_",asn1ct_gen:list2name(Typename), "'({'",asn1ct_gen:list2name(Typename),"',Val}, TagIn) ->",nl}), @@ -1673,19 +1643,6 @@ mkfuncname(WhatKind,DecOrEnc) -> end. -optionals(L) -> optionals(L,[],1). - -optionals([{'EXTENSIONMARK',_,_}|Rest],Acc,Pos) -> - optionals(Rest,Acc,Pos); % optionals in extension are currently not handled -optionals([#'ComponentType'{name=Name,prop='OPTIONAL'}|Rest],Acc,Pos) -> - optionals(Rest,[{Name,Pos}|Acc],Pos+1); -optionals([#'ComponentType'{name=Name,prop={'DEFAULT',_}}|Rest],Acc,Pos) -> - optionals(Rest,[{Name,Pos}|Acc],Pos+1); -optionals([#'ComponentType'{}|Rest],Acc,Pos) -> - optionals(Rest,Acc,Pos+1); -optionals([],Acc,_) -> - lists:reverse(Acc). - get_constraint(C,Key) -> case lists:keysearch(Key,1,C) of false -> |