Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
3411-asn1-Fix-feature-interaction-with-undec_re...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3411-asn1-Fix-feature-interaction-with-undec_rest-and-asn.patch of Package erlang
From f97dc074e992e1d8106b5e35b3ea6fdef7664171 Mon Sep 17 00:00:00 2001 From: Vance Shipley <vances@sigscale.org> Date: Tue, 10 Sep 2024 18:39:01 +0800 Subject: [PATCH 1/2] asn1: Fix feature interaction with +undec_rest and +asn1config --- lib/asn1/src/asn1ct_gen.erl | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl index 213e4f5b82..7ee834f37e 100644 --- a/lib/asn1/src/asn1ct_gen.erl +++ b/lib/asn1/src/asn1ct_gen.erl @@ -941,7 +941,7 @@ gen_info_functions(Gen) -> "legacy_erlang_types() -> ", {asis,asn1ct:use_legacy_types()},".",nl,nl]). -gen_decode_partial_incomplete(#gen{erule=ber}, NoOkWrapper) -> +gen_decode_partial_incomplete(#gen{erule=ber, options=Options}, NoOkWrapper) -> case {asn1ct:read_config_data(partial_incomplete_decode), asn1ct:get_gen_state_field(inc_type_pattern)} of {undefined,_} -> @@ -949,16 +949,25 @@ gen_decode_partial_incomplete(#gen{erule=ber}, NoOkWrapper) -> {_,undefined} -> ok; _ -> - emit(["decode_partial_incomplete(Type, Data0, Pattern) ->",nl, - " {Data,_RestBin} =",nl, - " ",{call,ber,decode_primitive_incomplete, - ["Pattern","Data0"]},com,nl]), - case NoOkWrapper of - true -> - emit([" decode_partial_inc_disp(Type, Data)",nl]); - false -> - emit([" try {ok,decode_partial_inc_disp(Type, Data)}",nl, - try_catch()]) + emit(["decode_partial_incomplete(Type, Data0, Pattern) ->",nl]), + case {NoOkWrapper, lists:member(undec_rest, Options)} of + {true, _} -> + emit([" {Data,_RestBin} =",nl, + " ",{call,ber,decode_primitive_incomplete, + ["Pattern","Data0"]},com,nl, + " decode_partial_inc_disp(Type, Data)",nl]); + {false, true} -> + emit([" {Data,RestBin} =",nl, + " ",{call,ber,decode_primitive_incomplete, + ["Pattern","Data0"]},com,nl, + " try {ok,decode_partial_inc_disp(Type, Data),RestBin}", + nl,try_catch()]); + {false, false} -> + emit([" {Data,RestBin} =",nl, + " ",{call,ber,decode_primitive_incomplete, + ["Pattern","Data0"]},com,nl, + " try {ok,decode_partial_inc_disp(Type, Data)}", + nl,try_catch()]) end, emit([".",nl,nl]), -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor