[erl] fix generator to use unexpanded structs for reply_types on functions
authorDavid Reiss <dreiss@apache.org>
Wed, 11 Jun 2008 01:15:54 +0000 (01:15 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 11 Jun 2008 01:15:54 +0000 (01:15 +0000)
This fixes a bug where thrift_client would return a tuple rather than a tagged record when the called function returned a struct.

Test plan:
  in tutorial client:
    Log: {sharedStruct,1,<<"RARG">>}
  instead of:
    Log: {1,<<"RARG">>}

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666482 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_erl_generator.cc

index b6c8c52..f064ae0 100644 (file)
@@ -535,7 +535,8 @@ void t_erl_generator::generate_function_info(t_service* tservice,
   indent_up();
 
   if (!tfunction->get_returntype()->is_void())
-    indent(f_service_) << generate_type_term(tfunction->get_returntype(), true) << ";" << endl;
+    indent(f_service_) <<
+        generate_type_term(tfunction->get_returntype(), false) << ";" << endl;
   else if (tfunction->is_async())
     indent(f_service_) << "async_void;" << endl;
   else