summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/cpp/src/generate/t_cocoa_generator.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/cpp/src/generate/t_cocoa_generator.cc b/compiler/cpp/src/generate/t_cocoa_generator.cc
index 64c293900..57a753beb 100644
--- a/compiler/cpp/src/generate/t_cocoa_generator.cc
+++ b/compiler/cpp/src/generate/t_cocoa_generator.cc
@@ -1149,7 +1149,11 @@ void t_cocoa_generator::generate_cocoa_service_helpers(t_service* tservice) {
}
string t_cocoa_generator::function_result_helper_struct_type(t_function* tfunction) {
- return capitalize(tfunction->get_name()) + "_result";
+ if (tfunction->is_oneway()) {
+ return capitalize(tfunction->get_name());
+ } else {
+ return capitalize(tfunction->get_name()) + "_result";
+ }
}
@@ -1541,6 +1545,9 @@ void t_cocoa_generator::generate_cocoa_service_server_implementation(ofstream& o
// generate a process_XXXX method for each service function, which reads args, calls the service, and writes results
functions = tservice->get_functions();
for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
+ if ((*f_iter)->is_oneway()) {
+ continue;
+ }
out << endl;
string funname = (*f_iter)->get_name();
out << indent() << "- (void) process_" << funname << "_withSequenceID: (int32_t) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol: (id<TProtocol>) outProtocol" << endl;