From: Andrew McGeachie Date: Tue, 21 Jul 2009 16:12:33 +0000 (+0000) Subject: THRIFT-520. Fix generation of cocoa constants when a namespace prefix is set. X-Git-Tag: 0.2.0~67 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=7564925daa68bbc0ae6d986aabe63c8130379884;p=common%2Fthrift.git THRIFT-520. Fix generation of cocoa constants when a namespace prefix is set. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796356 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/generate/t_cocoa_generator.cc b/compiler/cpp/src/generate/t_cocoa_generator.cc index 5294eff6..258964f3 100644 --- a/compiler/cpp/src/generate/t_cocoa_generator.cc +++ b/compiler/cpp/src/generate/t_cocoa_generator.cc @@ -385,7 +385,7 @@ void t_cocoa_generator::generate_consts(std::vector consts) { if ((*c_iter)->get_type()->is_container() || (*c_iter)->get_type()->is_struct()) { string name = (*c_iter)->get_name(); - f_impl_ << indent() << name << " = " << render_const_value(name, + f_impl_ << indent() << cocoa_prefix_ << name << " = " << render_const_value(name, (*c_iter)->get_type(), (*c_iter)->get_value()); f_impl_ << ";" << endl; @@ -400,7 +400,7 @@ void t_cocoa_generator::generate_consts(std::vector consts) { f_impl_ << "+ (" << type_name(type) << ") " << name; scope_up(f_impl_); - indent(f_impl_) << "return " << name << ";" << endl; + indent(f_impl_) << "return " << cocoa_prefix_ << name << ";" << endl; scope_down(f_impl_); }