aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-07-05 11:21:21 +0200
committerLukas Larsson <[email protected]>2011-08-01 16:37:59 +0200
commit3788f9e739b8468e35a772c501f990f7d8309adb (patch)
treeacee1460bd7fcc00bba24288a62428afc3d8d65d /lib/asn1/src/asn1rt_per_bin_rt2ct.erl
parent43cb29816f5b4d3b67ef83644f2ea30fa5cadac5 (diff)
downloadotp-3788f9e739b8468e35a772c501f990f7d8309adb.tar.gz
otp-3788f9e739b8468e35a772c501f990f7d8309adb.tar.bz2
otp-3788f9e739b8468e35a772c501f990f7d8309adb.zip
Add support for nif option to optimized PER asn1 compilation
Diffstat (limited to 'lib/asn1/src/asn1rt_per_bin_rt2ct.erl')
-rw-r--r--lib/asn1/src/asn1rt_per_bin_rt2ct.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1rt_per_bin_rt2ct.erl b/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
index f4aecf9322..307b0aa5f1 100644
--- a/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
+++ b/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
@@ -39,7 +39,7 @@
encode_object_identifier/1, decode_object_identifier/1,
encode_real/1, decode_real/1,
encode_relative_oid/1, decode_relative_oid/1,
- complete/1]).
+ complete/1, complete/2]).
-export([encode_open_type/2, decode_open_type/2]).
@@ -1742,6 +1742,8 @@ complete(L) ->
{Acc,Bacc} ->
[Acc|complete_bytes(Bacc)]
end.
+complete(L,_) ->
+ complete(L).
% this function builds the ugly form of lists [E1|E2] to avoid having to reverse it at the end.
@@ -1842,6 +1844,9 @@ complete(L) ->
%% asn1-1.6.9
complete(L) ->
+ complete(L, driver).
+
+complete(L,driver) ->
case catch control(?COMPLETE_ENCODE,L) of
Bin when is_binary(Bin) ->
Bin;
@@ -1856,7 +1861,9 @@ complete(L) ->
Err ->
Err
end
- end.
+ end;
+complete(L,nif) ->
+ asn1rt_nif:encode_per_complete(L).
handle_error([],_)->