Author: geechorama
Date: Tue Jul 21 16:12:33 2009
New Revision: 796356

URL: http://svn.apache.org/viewvc?rev=796356&view=rev
Log:
THRIFT-520. Fix generation of cocoa constants when a namespace prefix is set.

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc?rev=796356&r1=796355&r2=796356&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc 
(original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc Tue 
Jul 21 16:12:33 2009
@@ -385,7 +385,7 @@
     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 @@
     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_);
   }
 


Reply via email to