summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunghoon Park <jh9216.park@samsung.com>2018-03-27 16:33:32 +0900
committerJunghoon Park <jh9216.park@samsung.com>2018-03-27 16:33:32 +0900
commit3a91bf71366cfd70b3bee73bc02e22b06205f4d8 (patch)
tree292aa27eb13170687db0263cf4d221904cf92f5d
parentcd630423899557f4f47ec484641a2af6fb1d0cf3 (diff)
downloadtidl-3a91bf71366cfd70b3bee73bc02e22b06205f4d8.tar.gz
tidl-3a91bf71366cfd70b3bee73bc02e22b06205f4d8.tar.bz2
tidl-3a91bf71366cfd70b3bee73bc02e22b06205f4d8.zip
Fix a bug at c-generator
- Wrong type was generated Change-Id: I38a1973142d54ed68015577bdfbe25e3677335a4 Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
-rw-r--r--idlc/c_gen/c_proxy_body_gen.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/idlc/c_gen/c_proxy_body_gen.cc b/idlc/c_gen/c_proxy_body_gen.cc
index d7299fb..377e356 100644
--- a/idlc/c_gen/c_proxy_body_gen.cc
+++ b/idlc/c_gen/c_proxy_body_gen.cc
@@ -405,6 +405,9 @@ std::string CProxyBodyGen::GetMethodWriteString(const Interface& inf,
return "&(*" + p->GetID() + ")->parcelable, " + "*" + p->GetID();
else
return "&" + p->GetID() + "->parcelable, " + p->GetID();
+ } else if (p->GetParameterType().GetDirection()
+ == ParameterType::Direction::REF) {
+ return "*" + p->GetID();
}
return p->GetID();
}
@@ -458,7 +461,7 @@ std::string CProxyBodyGen::GetMethodReadString(const Interface& inf,
p->GetParameterType().GetBaseType().ToString() == "list" ||
p->GetParameterType().GetBaseType().ToString() == "array")
return "&out_" + p->GetID() + "->parcelable, out_" + p->GetID();
- return "out_" + p->GetID();
+ return "&out_" + p->GetID();
}
);
s += "*" + p->GetID() + " = out_" + p->GetID() + ";" + NLine(1);