You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2016/01/14 19:24:24 UTC

thrift git commit: THRIFT-3545 Cocoa: Container type literals do not compile Client: Cocoa Patch: Christopher Rogers

Repository: thrift
Updated Branches:
  refs/heads/master fc07084ad -> 0bd810af8


THRIFT-3545 Cocoa: Container type literals do not compile
Client: Cocoa
Patch: Christopher Rogers <ch...@linecorp.com>

This closes #790


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/0bd810af
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/0bd810af
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/0bd810af

Branch: refs/heads/master
Commit: 0bd810af87f511a454922c5849725b143cf8e35f
Parents: fc07084
Author: Christopher Rogers <ch...@linecorp.com>
Authored: Wed Jan 13 12:52:41 2016 +0900
Committer: Jens Geyer <je...@apache.org>
Committed: Thu Jan 14 19:23:48 2016 +0100

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_cocoa_generator.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/0bd810af/compiler/cpp/src/generate/t_cocoa_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_cocoa_generator.cc b/compiler/cpp/src/generate/t_cocoa_generator.cc
index 8ea2400..c27d612 100644
--- a/compiler/cpp/src/generate/t_cocoa_generator.cc
+++ b/compiler/cpp/src/generate/t_cocoa_generator.cc
@@ -2758,7 +2758,7 @@ void t_cocoa_generator::print_const_value(ostream& out,
         mapout << ", ";
       }
     }
-    mapout << "}";
+    mapout << "};" << endl;
     out << mapout.str();
   } else if (type->is_list()) {
     ostringstream listout;
@@ -2775,7 +2775,7 @@ void t_cocoa_generator::print_const_value(ostream& out,
         listout << ", ";
       }
     }
-    listout << "]";
+    listout << "];" << endl;
     out << listout.str();
   } else if (type->is_set()) {
     ostringstream setout;
@@ -2785,14 +2785,14 @@ void t_cocoa_generator::print_const_value(ostream& out,
     vector<t_const_value*>::const_iterator v_iter;
     if (defval)
       setout << type_name(type) << " ";
-    setout << name << " = NSSet setWithArray:@[";
+    setout << name << " = [[NSSet alloc] initWithArray:@[";
     for (v_iter = val.begin(); v_iter != val.end();) {
       setout << render_const_value(out, etype, *v_iter, true);
       if (++v_iter != val.end()) {
         setout << ", ";
       }
     }
-    setout << "]]";
+    setout << "]];" << endl;
     out << setout.str();
   } else {
     throw "compiler error: no const of type " + type->get_name();