Add initializer for structure handle 07/186307/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 9 Aug 2018 01:23:01 +0000 (10:23 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 9 Aug 2018 01:23:01 +0000 (10:23 +0900)
Change-Id: I3a34ae2a008dd7b07941bd034f40c4764ae0b0d2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
idlc/c_gen/c_stub_body_gen.cc

index 565d7ea..7132fdf 100644 (file)
@@ -182,6 +182,11 @@ std::string CStubBodyGen::GetMethodString(const Interface& inf,
       str += "rpc_port_" + GetInterfaceIdWithNamespace(inf) + "_" +
           i->GetParameterType().GetBaseType().ToString() + "_h " +
           i->GetID() + " = NULL;" + NLine(1);
+    } else if (i->GetParameterType().GetBaseType().IsUserDefinedType() ||
+               i->GetParameterType().GetBaseType().ToString() == "list" ||
+               i->GetParameterType().GetBaseType().ToString() == "array") {
+      str += GetReturnTypeString(i->GetParameterType().GetBaseType()) +
+          i->GetID() + " = NULL;" + NLine(1);
     } else {
       str += GetReturnTypeString(i->GetParameterType().GetBaseType()) +
           i->GetID() + ";" + NLine(1);