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 2015/03/03 21:36:01 UTC

[1/3] thrift git commit: THRIFT-3019 Golang generator missing docstring for structs Client: Go Patch: Abdel Said

Repository: thrift
Updated Branches:
  refs/heads/master f702fed42 -> eda0f844e


THRIFT-3019 Golang generator missing docstring for structs
Client: Go
Patch: Abdel Said


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

Branch: refs/heads/master
Commit: 3811e59c15af82b14413520b377a4d225f8f0e5a
Parents: f702fed
Author: Jens Geyer <je...@apache.org>
Authored: Tue Mar 3 21:07:55 2015 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Mar 3 21:35:36 2015 +0100

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_go_generator.cc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/3811e59c/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 07712f9..87681e1 100644
--- a/compiler/cpp/src/generate/t_go_generator.cc
+++ b/compiler/cpp/src/generate/t_go_generator.cc
@@ -1071,6 +1071,7 @@ void t_go_generator::generate_go_struct_definition(ofstream& out,
   vector<t_field*>::const_iterator m_iter;
 
   std::string tstruct_name(publicize(tstruct->get_name(), is_args || is_result));
+  generate_go_docstring(out, tstruct);
   out << indent() << "type " << tstruct_name << " struct {" << endl;
   /*
      Here we generate the structure specification for the fastbinary codec.


[3/3] thrift git commit: THRIFT-3021 Service remote tool does not import stub package with package prefix Client: Go Patch: Yinyin L

Posted by je...@apache.org.
THRIFT-3021 Service remote tool does not import stub package with package prefix
Client: Go
Patch: Yinyin L <yi...@gmail.com>

This closes #385


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

Branch: refs/heads/master
Commit: eda0f844ee5f564aa50e5d406b0ff0350beba9f6
Parents: a6ea444
Author: Jens Geyer <je...@apache.org>
Authored: Tue Mar 3 21:21:19 2015 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Mar 3 21:35:44 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/thrift/blob/eda0f844/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 87681e1..cb1ec80 100644
--- a/compiler/cpp/src/generate/t_go_generator.cc
+++ b/compiler/cpp/src/generate/t_go_generator.cc
@@ -1975,6 +1975,9 @@ void t_go_generator::generate_service_remote(t_service* tservice) {
   while ((loc = service_module.find(".")) != string::npos) {
     service_module.replace(loc, 1, 1, '/');
   }
+  if(!gen_package_prefix_.empty()) {
+    service_module = gen_package_prefix_ + service_module;
+  }
 
   f_remote << go_autogen_comment();
   f_remote << indent() << "package main" << endl << endl;


[2/3] thrift git commit: THRIFT-3018 Compact protocol for Delphi, one missing test case added Client: Delphi Patch: Jens Geyer

Posted by je...@apache.org.
THRIFT-3018 Compact protocol for Delphi, one missing test case added
Client: Delphi
Patch: Jens Geyer


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

Branch: refs/heads/master
Commit: a6ea4442dddfac1342835a30b1c8a81adb207a46
Parents: 3811e59
Author: Jens Geyer <je...@apache.org>
Authored: Mon Mar 2 23:06:57 2015 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Mar 3 21:35:40 2015 +0100

----------------------------------------------------------------------
 lib/delphi/src/Thrift.Protocol.Compact.pas | 27 +++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/a6ea4442/lib/delphi/src/Thrift.Protocol.Compact.pas
----------------------------------------------------------------------
diff --git a/lib/delphi/src/Thrift.Protocol.Compact.pas b/lib/delphi/src/Thrift.Protocol.Compact.pas
index 89bf9fb..818ef5d 100644
--- a/lib/delphi/src/Thrift.Protocol.Compact.pas
+++ b/lib/delphi/src/Thrift.Protocol.Compact.pas
@@ -522,7 +522,6 @@ end;
 procedure TCompactProtocolImpl.WriteDouble( const dub: Double);
 var data : TBytes;
 begin
-  SetLength( data, 8);
   fixedLongToBytes( DoubleToInt64Bits(dub), data);
   Transport.Write( data);
 end;
@@ -629,7 +628,7 @@ end;
 // Convert a Int64 into 8 little-endian bytes in buf
 class procedure TCompactProtocolImpl.fixedLongToBytes( const n : Int64; var buf : TBytes);
 begin
-  ASSERT( Length(buf) >= 8);
+  SetLength( buf, 8);
   buf[0] := Byte( n         and $FF);
   buf[1] := Byte((n shr 8)  and $FF);
   buf[2] := Byte((n shr 16) and $FF);
@@ -1064,10 +1063,34 @@ end;
 {$ENDIF}
 
 
+{$IFDEF Debug}
+procedure TestLongBytes;
+
+  procedure Test( const test : Int64);
+  var buf : TBytes;
+  begin
+    TCompactProtocolImpl.fixedLongToBytes( test, buf);
+    ASSERT( TCompactProtocolImpl.bytesToLong( buf) = test, IntToStr(test));
+  end;
+
+var i : Integer;
+begin
+  Test( 0);
+  for i := 0 to 62 do begin
+    Test( +(Int64(1) shl i));
+    Test( -(Int64(1) shl i));
+  end;
+  Test( Int64($7FFFFFFFFFFFFFFF));
+  Test( Int64($8000000000000000));
+end;
+{$ENDIF}
+
+
 initialization
   {$IFDEF Debug}
   TestDoubleToInt64Bits;
   TestZigZag;
+  TestLongBytes;
   {$ENDIF}
 
 end.