From: Ilho Kim Date: Tue, 28 May 2024 09:57:46 +0000 (+0900) Subject: Fix user enum type out parameter in c proxy X-Git-Tag: accepted/tizen/8.0/unified/20240619.075732~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15e18a2682ef1457d1703aa21518f96f8c3235dd;p=platform%2Fcore%2Fappfw%2Ftidl.git Fix user enum type out parameter in c proxy Change-Id: I0c7715ea9ed885a1c68c01bd93bb790f07303836 Signed-off-by: Ilho Kim --- diff --git a/idlc/gen/version2/c_proxy_body_generator.cc b/idlc/gen/version2/c_proxy_body_generator.cc index 9cbbce7..4fbdd4d 100644 --- a/idlc/gen/version2/c_proxy_body_generator.cc +++ b/idlc/gen/version2/c_proxy_body_generator.cc @@ -186,7 +186,7 @@ std::string CProxyBodyGenerator::GenMethodParams(const Interface& iface, } std::string CProxyBodyGenerator::GenMethodArgs(const Interface& iface, - const Declaration& decl) { + const Declaration& decl, const std::string& id) { std::string code; for (const auto& param : decl.GetParameters()) { auto& param_type = param->GetParameterType(); @@ -194,7 +194,7 @@ std::string CProxyBodyGenerator::GenMethodArgs(const Interface& iface, continue; auto& type = param_type.GetBaseType(); - code += GetReturnTypeString(type) + "new_" + param->GetID() + ";"; + code += GetReturnTypeString(type, id) + "new_" + param->GetID() + ";"; code += NLine(1); } @@ -389,7 +389,7 @@ void CProxyBodyGenerator::GenMethodBase(std::ofstream& stream, .Change("", iface.GetID()) .Change("", decl.GetID()) .Change("", GenMethodParams(iface, decl)) - .Change("", GenMethodArgs(iface, decl)) + .Change("", GenMethodArgs(iface, decl, iface.GetID())) .Change("", GetErrorValue(decl.GetType())) .Change("", GenMethodParamsCheck(iface, decl)) .ChangeToUpper("", GetHandlePrefix()) diff --git a/idlc/gen/version2/c_proxy_body_generator.hh b/idlc/gen/version2/c_proxy_body_generator.hh index bdfbc55..ff26d08 100644 --- a/idlc/gen/version2/c_proxy_body_generator.hh +++ b/idlc/gen/version2/c_proxy_body_generator.hh @@ -45,7 +45,9 @@ class CProxyBodyGenerator : public CBodyGeneratorBase { const Interface& iface); void GenInterface(std::ofstream& stream); std::string GenMethodParams(const Interface& iface, const Declaration& decl); - std::string GenMethodArgs(const Interface& iface, const Declaration& decl); + std::string GenMethodArgs(const Interface& iface, + const Declaration& decl, + const std::string& id); std::string GenMethodParamsCheck(const Interface& iface, const Declaration& decl); std::string GenMethodUnitMapWrite(const Interface& iface,