From fad4c7e06a1e1b1bed0c1715b85af17e4b27bd93 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 18 Jun 2024 15:59:17 +0900 Subject: [PATCH] Fix wrong implementation The param_name should be used to set the proper value. Change-Id: I6b4f06e6491455b2590b29d5b1806d8f4389dbfd Signed-off-by: Hwankyu Jhun --- idlc/gen/c_proxy_body_gen.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idlc/gen/c_proxy_body_gen.cc b/idlc/gen/c_proxy_body_gen.cc index 94da9ad..78b224e 100644 --- a/idlc/gen/c_proxy_body_gen.cc +++ b/idlc/gen/c_proxy_body_gen.cc @@ -424,7 +424,7 @@ std::string CProxyBodyGen::GenMethodParcelWrite(const Interface& iface, std::string param_name = param_type.GetDirection() == ParameterType::Direction::REF - ? "*" + p->GetID() : p->GetID(); + ? "(*" + p->GetID() + ")" : p->GetID(); std::string parcel_write_code; auto& type = param_type.GetBaseType(); if (IsDelegateType(iface, type) || @@ -433,7 +433,7 @@ std::string CProxyBodyGen::GenMethodParcelWrite(const Interface& iface, type.ToString() == "array") { parcel_write_code = ReplaceAll( CB_INTERFACE_METHOD_USER_DEFINED_PARCEL_WRITE, "", - p->GetID()); + param_name); std::string name = GetFullNameFromType(type, iface); parcel_write_code += GetPrivateSharingString(type, iface, "h->port", param_name); -- 2.7.4