From c82bbd8f28f3e0ce00f5db44f7a6cef75653eee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 10 Sep 2015 16:10:31 +0200 Subject: asn1: Remove deprecated functions Remove the entire asn1rt module. All functions in it were deprecated in OTP 17. In asn1ct, remove the deprecated functions asn1ct:encode/3 and asn1ct:decode/3. Also remove asn1ct:encode/2, which has not been formally deprecated but is undocumented. --- lib/asn1/doc/src/asn1ct.xml | 45 +++------------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) (limited to 'lib/asn1/doc/src/asn1ct.xml') diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml index e5a7b1bcc4..ebe1ce44dc 100644 --- a/lib/asn1/doc/src/asn1ct.xml +++ b/lib/asn1/doc/src/asn1ct.xml @@ -320,45 +320,6 @@ File3.asn - - encode(Module, Type, Value)-> {ok, Bytes} | {error, Reason} - Encodes an ASN.1 value. - - Module = Type = atom() - Value = term() - Bytes = binary() - Reason = term() - - -

Encodes Value of Type defined in the ASN.1 module - Module. To get as fast execution as possible, the - encode function performs only the rudimentary tests that input - Value is a correct instance of Type. So, for example, - the length of strings is - not always checked. Returns {ok, Bytes} if successful or - {error, Reason} if an error occurred. -

-

This function is deprecated. - Use Module:encode(Type, Value) instead.

-
-
- - - decode(Module, Type, Bytes) -> {ok, Value} | {error, Reason} - Decode from Bytes into an ASN.1 value. - - Module = Type = atom() - Value = Reason = term() - Bytes = binary() - - -

Decodes Type from Module from the binary - Bytes. Returns {ok, Value} if successful.

-

This function is deprecated. - Use Module:decode(Type, Bytes) instead.

-
-
- value(Module, Type) -> {ok, Value} | {error, Reason} Creates an ASN.1 value for test purposes. @@ -424,11 +385,11 @@ File3.asn

Schematically, the following occurs for each type in the module:

{ok, Value} = asn1ct:value(Module, Type), -{ok, Bytes} = asn1ct:encode(Module, Type, Value), -{ok, Value} = asn1ct:decode(Module, Type, Bytes). +{ok, Bytes} = Module:encode(Type, Value), +{ok, Value} = Module:decode(Type, Bytes).

The test functions use the *.asn1db files for all included modules. If they are located in a different - directory than the current working directory, use the include + directory than the current working directory, use the include option to add paths. This is only needed when automatically generating values. For static values using Value no options are needed.

-- cgit v1.2.3