From: Hwankyu Jhun Date: Thu, 30 Sep 2021 07:26:41 +0000 (+0900) Subject: Fix a bug about C Generator X-Git-Tag: submit/tizen/20210930.081506~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b4aec8cd6b09970e2980c2086eaddee5915e822;p=platform%2Fcore%2Fappfw%2Ftidl.git Fix a bug about C Generator If the direction of the parameter type is not 'IN', the method handler MUST not read the data from the parcel handle. Change-Id: Ifb792140a2f0f74173605ab31265a05280cd05a9 Signed-off-by: Hwankyu Jhun --- diff --git a/idlc/gen/c_stub_body_gen.cc b/idlc/gen/c_stub_body_gen.cc index 03a29b38..0d571cd7 100644 --- a/idlc/gen/c_stub_body_gen.cc +++ b/idlc/gen/c_stub_body_gen.cc @@ -404,6 +404,9 @@ std::string CStubBodyGen::GenMethodHandlerParcelRead(const Interface& iface, for (auto& p : decl.GetParameters().GetParams()) { std::string parcel_read_code; auto& param_type = p->GetParameterType(); + if (param_type.GetDirection() != ParameterType::Direction::IN) + continue; + auto& type = param_type.GetBaseType(); if (IsDelegateType(iface, type)) { parcel_read_code = ReplaceAll(