aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-11-12 14:26:46 +0100
committerBjörn Gustavsson <[email protected]>2012-11-22 17:23:12 +0100
commit3d8455a53e1980c82cf329c9bbe01ce51c17248b (patch)
treed998f2c9cc81d248f971916cae5089b0c1705a04 /lib/asn1/src
parent3945f3daaf9fb0038e9aacae1b11275a1e05b649 (diff)
downloadotp-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')
-rw-r--r--lib/asn1/src/asn1ct.erl10
-rw-r--r--lib/asn1/src/asn1ct_gen_ber.erl47
-rw-r--r--lib/asn1/src/asn1ct_gen_ber_bin_v2.erl47
3 files changed, 5 insertions, 99 deletions
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl
index 8e971a1c76..47b4299971 100644
--- a/lib/asn1/src/asn1ct.erl
+++ b/lib/asn1/src/asn1ct.erl
@@ -1115,7 +1115,6 @@ remove_asn_flags(Options) ->
X /= optimize,
X /= compact_bit_string,
X /= debug,
- X /= keyed_list,
X /= asn1config,
X /= record_name_prefix].
@@ -1125,12 +1124,6 @@ debug_on(Options) ->
put(asndebug,true);
_ ->
true
- end,
- case lists:member(keyed_list,Options) of
- true ->
- put(asn_keyed_list,true);
- _ ->
- true
end.
igorify_options(Options) ->
@@ -1151,8 +1144,7 @@ generated_file(Name,Options) ->
end.
debug_off(_Options) ->
- erase(asndebug),
- erase(asn_keyed_list).
+ erase(asndebug).
outfile(Base, Ext, Opts) ->
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 ->
diff --git a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
index 3ccfca3784..e20c2ead37 100644
--- a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
+++ b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
@@ -116,22 +116,7 @@ gen_encode(Erules,Typename,Type) when is_record(Type,type) ->
end,
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),
@@ -175,22 +160,7 @@ gen_encode_user(Erules,D) when is_record(D,typedef) ->
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}),
@@ -1772,19 +1742,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 ->