Commit a512f387 authored by j4cbo's avatar j4cbo

Merge pull request #67 from mrdomino/fix-objcproxy-namespace

Correct namespace for ObjcProxy return types
parents a659825a 21fecda4
...@@ -327,7 +327,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -327,7 +327,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
w.wl(s"virtual ~$objcExtSelf () override;") w.wl(s"virtual ~$objcExtSelf () override;")
w.wl(s"static std::shared_ptr<${withNs(spec.cppNamespace, idCpp.ty(ident.name))}> ${idCpp.method(ident.name + "_with_objc")} (id objcRef);") w.wl(s"static std::shared_ptr<${withNs(spec.cppNamespace, idCpp.ty(ident.name))}> ${idCpp.method(ident.name + "_with_objc")} (id objcRef);")
for (m <- i.methods) { for (m <- i.methods) {
val ret = m.ret.fold("void")(toCppType(_)) val ret = m.ret.fold("void")(toCppType(_, spec.cppNamespace))
val params = m.params.map(p => toCppParamType(p, spec.cppNamespace)) val params = m.params.map(p => toCppParamType(p, spec.cppNamespace))
w.wl(s"virtual $ret ${idCpp.method(m.ident)} ${params.mkString("(", ", ", ")")} override;") w.wl(s"virtual $ret ${idCpp.method(m.ident)} ${params.mkString("(", ", ", ")")} override;")
} }
...@@ -356,7 +356,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -356,7 +356,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
} }
for (m <- i.methods) { for (m <- i.methods) {
w.wl w.wl
val ret = m.ret.fold("void")(toCppType(_)) val ret = m.ret.fold("void")(toCppType(_, spec.cppNamespace))
val params = m.params.map(p => toCppParamType(p, spec.cppNamespace)) val params = m.params.map(p => toCppParamType(p, spec.cppNamespace))
w.wl(s"$ret $objcExtSelf::${idCpp.method(m.ident)} ${params.mkString("(", ", ", ")")}").braced { w.wl(s"$ret $objcExtSelf::${idCpp.method(m.ident)} ${params.mkString("(", ", ", ")")}").braced {
w.w("@autoreleasepool").braced { w.w("@autoreleasepool").braced {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment