You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2016/01/24 12:25:35 UTC

thrift git commit: THRIFT-3575 Go compiler tries to use unexported library methods when using read_write_private Client: Go Patch: Chris Bannister

Repository: thrift
Updated Branches:
  refs/heads/master 5e432ec37 -> 41e484778


THRIFT-3575 Go compiler tries to use unexported library methods when using read_write_private
Client: Go
Patch: Chris Bannister


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/41e48477
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/41e48477
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/41e48477

Branch: refs/heads/master
Commit: 41e4847786a68219263b7450573a4fce5c92672b
Parents: 5e432ec
Author: Jens Geyer <je...@apache.org>
Authored: Sun Jan 24 12:19:12 2016 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Sun Jan 24 12:25:00 2016 +0100

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_go_generator.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/41e48477/compiler/cpp/src/generate/t_go_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_go_generator.cc b/compiler/cpp/src/generate/t_go_generator.cc
index 7bcf7b1..09ab530 100644
--- a/compiler/cpp/src/generate/t_go_generator.cc
+++ b/compiler/cpp/src/generate/t_go_generator.cc
@@ -2033,7 +2033,7 @@ void t_go_generator::generate_service_client(t_service* tservice) {
                  << " := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "
                     "\"Unknown Exception\")" << endl;
       f_service_ << indent() << "  var " << error2 << " error" << endl;
-      f_service_ << indent() << "  " << error2 << ", err = " << error << "." << read_method_name_ << "(iprot)" << endl;
+      f_service_ << indent() << "  " << error2 << ", err = " << error << ".Read(iprot)" << endl;
       f_service_ << indent() << "  if err != nil {" << endl;
       f_service_ << indent() << "    return" << endl;
       f_service_ << indent() << "  }" << endl;
@@ -2616,7 +2616,7 @@ void t_go_generator::generate_service_server(t_service* tservice) {
                << " := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, \"Unknown function "
                   "\" + name)" << endl;
     f_service_ << indent() << "  oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)" << endl;
-    f_service_ << indent() << "  " << x << "." << write_method_name_ << "(oprot)" << endl;
+    f_service_ << indent() << "  " << x << ".Write(oprot)" << endl;
     f_service_ << indent() << "  oprot.WriteMessageEnd()" << endl;
     f_service_ << indent() << "  oprot.Flush()" << endl;
     f_service_ << indent() << "  return false, " << x << endl;
@@ -2680,7 +2680,7 @@ void t_go_generator::generate_process_function(t_service* tservice, t_function*
                << endl;
     f_service_ << indent() << "  oprot.WriteMessageBegin(\"" << escape_string(tfunction->get_name())
                << "\", thrift.EXCEPTION, seqId)" << endl;
-    f_service_ << indent() << "  x." << write_method_name_ << "(oprot)" << endl;
+    f_service_ << indent() << "  x.Write(oprot)" << endl;
     f_service_ << indent() << "  oprot.WriteMessageEnd()" << endl;
     f_service_ << indent() << "  oprot.Flush()" << endl;
   }
@@ -2746,7 +2746,7 @@ void t_go_generator::generate_process_function(t_service* tservice, t_function*
                << ": \" + err2.Error())" << endl;
     f_service_ << indent() << "  oprot.WriteMessageBegin(\"" << escape_string(tfunction->get_name())
                << "\", thrift.EXCEPTION, seqId)" << endl;
-    f_service_ << indent() << "  x." << write_method_name_ << "(oprot)" << endl;
+    f_service_ << indent() << "  x.Write(oprot)" << endl;
     f_service_ << indent() << "  oprot.WriteMessageEnd()" << endl;
     f_service_ << indent() << "  oprot.Flush()" << endl;
   }