You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ge...@apache.org on 2009/10/27 21:23:03 UTC
svn commit: r830326 -
/incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
Author: geechorama
Date: Tue Oct 27 20:23:02 2009
New Revision: 830326
URL: http://svn.apache.org/viewvc?rev=830326&view=rev
Log:
THRIFT-521. Change @synthesize property declarations to @dynamic for happy compiling on OS X 10.6 as well as 10.5
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=830326&r1=830325&r2=830326&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 Oct 27 20:23:02 2009
@@ -173,7 +173,7 @@
std::string base_type_name(t_base_type* tbase);
std::string declare_field(t_field* tfield);
std::string declare_property(t_field* tfield);
- std::string synthesize_property(t_field* tfield);
+ std::string dynamic_property(t_field* tfield);
std::string function_signature(t_function* tfunction);
std::string argument_list(t_struct* tstruct);
std::string type_to_enum(t_type* ttype);
@@ -574,11 +574,11 @@
const vector<t_field*>& members = tstruct->get_members();
vector<t_field*>::const_iterator m_iter;
- // synthesize properties
+ // @dynamic property declarations
if (!members.empty()) {
out << "#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)" << endl;
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
- out << indent() << synthesize_property(*m_iter) << endl;
+ out << indent() << dynamic_property(*m_iter) << endl;
}
out << "#endif" << endl << endl;
}
@@ -2187,12 +2187,12 @@
}
/**
- * Synthesizes an Objective-C 2.0 property.
+ * Add @dynamic declaration for an Objective-C 2.0 property.
*
- * @param tfield The field to synthesize a property for
+ * @param tfield The field for which to declare a dynamic property
*/
-string t_cocoa_generator::synthesize_property(t_field* tfield) {
- return "@synthesize " + tfield->get_name() + ";";
+string t_cocoa_generator::dynamic_property(t_field* tfield) {
+ return "@dynamic " + tfield->get_name() + ";";
}
/**