common/thrift.git
15 years agoTHRIFT-583. python: Allow new-style classes for Interfaces
David Reiss [Wed, 16 Sep 2009 16:50:00 +0000 (16:50 +0000)] 
THRIFT-583. python: Allow new-style classes for Interfaces

The original new-style class only affected structs, enums, and
exceptions.

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

15 years agoTHRIFT-574. erlang: Support framed transport for servers
David Reiss [Wed, 9 Sep 2009 17:18:57 +0000 (17:18 +0000)] 
THRIFT-574. erlang: Support framed transport for servers

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

15 years agoTHRIFT-575. Allow required fields in function parameters
David Reiss [Wed, 2 Sep 2009 22:15:55 +0000 (22:15 +0000)] 
THRIFT-575. Allow required fields in function parameters

r665255 was a bit too aggressive.  "optional" was causing confusion,
but there doesn't seem to be any harm in allowing "required".

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

15 years agoTHRIFT-569. rb: Segmentation Fault when using BinaryProtocolAccelerated in Ruby
Bryan Duxbury [Wed, 2 Sep 2009 20:05:07 +0000 (20:05 +0000)] 
THRIFT-569. rb: Segmentation Fault when using BinaryProtocolAccelerated in Ruby

This patch checks to make sure that a value is a string before treating it as one.

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

15 years agoTHRIFT-572. rb: fix RSTRING for 1.9 compatibility
Bryan Duxbury [Tue, 1 Sep 2009 23:18:34 +0000 (23:18 +0000)] 
THRIFT-572. rb: fix RSTRING for 1.9 compatibility

Use a macro compatible with Ruby 1.9.

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

15 years agoTHRIFT-409. java: Add "union" to Thrift
Bryan Duxbury [Tue, 1 Sep 2009 23:03:47 +0000 (23:03 +0000)] 
THRIFT-409. java: Add "union" to Thrift

This patch introduces new IDL syntax for creating Unions, explicityly single-valued structs. While the parser changes are portable, this patch only includes the actual generated code changes for the Java library. Other libraries can continue to generate a struct with the same fields and remain compatible until they are able to implement the full shebang.

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

15 years agoTHRIFT-571. rb: compact_protocol.c:89: warning: format not a string literal and no...
Bryan Duxbury [Tue, 1 Sep 2009 22:32:50 +0000 (22:32 +0000)] 
THRIFT-571. rb: compact_protocol.c:89: warning: format not a string literal and no format arguments

This patch solves the issue for those of you on Ruby 1.9.1.

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

15 years agoMinor whitespace fixes in the Java generator and gen-code
David Reiss [Tue, 1 Sep 2009 21:36:46 +0000 (21:36 +0000)] 
Minor whitespace fixes in the Java generator and gen-code

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

15 years agoTHRIFT-214. cpp: Qualify another cast
David Reiss [Tue, 1 Sep 2009 18:03:07 +0000 (18:03 +0000)] 
THRIFT-214. cpp: Qualify another cast

r722337 only fixed one occurrence of this issue.
Not sure why this one hasn't been a problem before,
but it is breaking compilation on Mac OS 10.6.

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

15 years agoRevert r806014 "THRIFT-562. java: Java is inconsistent ..."
David Reiss [Thu, 27 Aug 2009 20:27:09 +0000 (20:27 +0000)] 
Revert r806014 "THRIFT-562. java: Java is inconsistent ..."

- It changed the semantics of default-presence fields.
- It messed up calls that accept exceptions.
- Full details on issue.

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

15 years agoTHRIFT-562. java: Java is inconsistent checking for required fields
Bryan Duxbury [Thu, 20 Aug 2009 01:00:18 +0000 (01:00 +0000)] 
THRIFT-562. java: Java is inconsistent checking for required fields

This patch makes the compiler act consistently regarding what it means to be required or optional. Additionally, it cleans up the tests to actually use the Fixtures class all over.

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

15 years agoTHRIFT-566. java: jar file should contain copies of LICENSE and NOTICE files
Bryan Duxbury [Thu, 20 Aug 2009 00:55:12 +0000 (00:55 +0000)] 
THRIFT-566. java: jar file should contain copies of LICENSE and NOTICE files

LICENSE and NOTICE are now included in the jar file by the build process.

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

15 years agoTHRIFT-558. java: Replace use of log4j by commons-logging in Java library and genera...
Bryan Duxbury [Fri, 14 Aug 2009 20:04:15 +0000 (20:04 +0000)] 
THRIFT-558. java:  Replace use of log4j by commons-logging in Java library and generated Java code

This patch switches Thrift to use slf4j instead of log4j.

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

15 years agoTHRIFT-561: Add "register" to list of reserved keywords
Mark Slee [Thu, 13 Aug 2009 19:21:40 +0000 (19:21 +0000)] 
THRIFT-561: Add "register" to list of reserved keywords

Reviewed By: dreiss

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

15 years agoTHRIFT-555. cpp: Fix macro defintions for TCompact on non-GNU big endian
David Reiss [Wed, 5 Aug 2009 16:42:59 +0000 (16:42 +0000)] 
THRIFT-555. cpp: Fix macro defintions for TCompact on non-GNU big endian

We were defining ntolell and letonll, but we were only using
htolell and letohll.

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

15 years agoTHRIFT-115. java: Isset structure has a large memory footprint
Bryan Duxbury [Mon, 3 Aug 2009 19:37:26 +0000 (19:37 +0000)] 
THRIFT-115. java: Isset structure has a large memory footprint

Instead of the old __isset structure, there is now a bit vector for fields that require an isset flag.

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

15 years agoTHRIFT-144. java: Generated classes should implement Comparable
Bryan Duxbury [Fri, 31 Jul 2009 19:32:34 +0000 (19:32 +0000)] 
THRIFT-144. java: Generated classes should implement Comparable

Forgot to add TBaseHelper.java. Oops.

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

15 years agoTHRIFT-547. rb: Thrift deserializer hangs when deserializing empty string
Bryan Duxbury [Fri, 31 Jul 2009 18:53:14 +0000 (18:53 +0000)] 
THRIFT-547. rb: Thrift deserializer hangs when deserializing empty string

Thrift::MemoryBuffer will now throw an EOFError when it cannot fulfill a request for data.

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

15 years agoTHRIFT-498. rb: Compact and Binary native protocols, used at the same time, can cause...
Bryan Duxbury [Fri, 31 Jul 2009 18:47:09 +0000 (18:47 +0000)] 
THRIFT-498. rb: Compact and Binary native protocols, used at the same time, can cause some issues

Disable native method table usage.

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

15 years agoTHRIFT-554: Perl improper namespace check for exception handling and writeMessageEnd...
T Jake Luciani [Fri, 31 Jul 2009 01:31:00 +0000 (01:31 +0000)] 
THRIFT-554: Perl improper namespace check for exception handling and writeMessageEnd missing on processor calls

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

15 years agoTHRIFT-144. java: Generated classes should implement Comparable
Bryan Duxbury [Fri, 31 Jul 2009 00:12:21 +0000 (00:12 +0000)] 
THRIFT-144. java: Generated classes should implement Comparable

If generated structs don't contain any incomparable child members, they implement Comparable.

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

15 years agoTHRIFT-552. rb: gem requires exactly rubygems 1.2.0
Bryan Duxbury [Thu, 30 Jul 2009 15:52:25 +0000 (15:52 +0000)] 
THRIFT-552. rb: gem requires exactly rubygems 1.2.0

The Thrift gem will now work with rubygems >= 1.2.0.

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

15 years agoTHRIFT-540. java: Have set methods return reference to self
Bryan Duxbury [Wed, 29 Jul 2009 23:47:38 +0000 (23:47 +0000)] 
THRIFT-540. java: Have set methods return reference to self

Issue title says it all, really.

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

15 years agoTHRIFT-479. java: Add javadocs for enum types
Bryan Duxbury [Wed, 29 Jul 2009 23:44:44 +0000 (23:44 +0000)] 
THRIFT-479. java: Add javadocs for enum types

Fields now reference their enum class name in javadoc. Also, generated enum classes's members are now javadoc'd.

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

15 years agoTHRIFT-477. java: remove extra methods generated for collections
Bryan Duxbury [Wed, 29 Jul 2009 19:46:00 +0000 (19:46 +0000)] 
THRIFT-477. java: remove extra methods generated for collections

This patch removes the special extra methods for collections.

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

15 years agoMake ax_lib_event.m4 set a per-version variable on success
David Reiss [Wed, 29 Jul 2009 19:07:33 +0000 (19:07 +0000)] 
Make ax_lib_event.m4 set a per-version variable on success

This makes it a little bit easier to check for several versions of
libevent and see which succeeded.

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

15 years agoTHRIFT-523. Make ax_lib_event.m4 work with newer versions of libevent
David Reiss [Wed, 29 Jul 2009 19:07:27 +0000 (19:07 +0000)] 
THRIFT-523. Make ax_lib_event.m4 work with newer versions of libevent

libevent changed is minor version numbering scheme with version 1.4.0,
and the simplistic comparison function used by ax_lib_event.m4 did not
work with the new scheme.  This patch introduced a more accurate
comparison function that works with all existing versions of libevent.

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

15 years agoTHRIFT-413. Suppport for annotations on base types
David Reiss [Mon, 27 Jul 2009 17:02:42 +0000 (17:02 +0000)] 
THRIFT-413. Suppport for annotations on base types

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

15 years agoTHRIFT-549. Make socket client compatible with iPhone SDK as well as OS X
Andrew McGeachie [Fri, 24 Jul 2009 15:58:07 +0000 (15:58 +0000)] 
THRIFT-549. Make socket client compatible with iPhone SDK as well as OS X

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

15 years agoTHRIFT-548. malloc our temporary buffer, rather than creating it on the stack.
Andrew McGeachie [Thu, 23 Jul 2009 18:12:18 +0000 (18:12 +0000)] 
THRIFT-548. malloc our temporary buffer, rather than creating it on the stack.

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

15 years agoTHRIFT-280. Server-side Cocoa implementation.
Andrew McGeachie [Tue, 21 Jul 2009 21:14:19 +0000 (21:14 +0000)] 
THRIFT-280. Server-side Cocoa implementation.

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

15 years agoTHRIFT-59. Make sure we don't over-release strings after we deserialize them.
Andrew McGeachie [Tue, 21 Jul 2009 20:14:31 +0000 (20:14 +0000)] 
THRIFT-59.  Make sure we don't over-release strings after we deserialize them.

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

15 years agoTHRIFT-545. Fix mem leak in generated 'description' method
Andrew McGeachie [Tue, 21 Jul 2009 17:22:03 +0000 (17:22 +0000)] 
THRIFT-545.  Fix mem leak in generated 'description' method

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

15 years agoTHRIFT-521. Generate objective-c 2.0 propery declarations on iphone and OS X 10.5...
Andrew McGeachie [Tue, 21 Jul 2009 16:51:49 +0000 (16:51 +0000)] 
THRIFT-521. Generate objective-c 2.0 propery declarations on iphone and OS X 10.5 and greater.

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

15 years agoTHRIFT-520. Fix generation of cocoa constants when a namespace prefix is set.
Andrew McGeachie [Tue, 21 Jul 2009 16:12:33 +0000 (16:12 +0000)] 
THRIFT-520. Fix generation of cocoa constants when a namespace prefix is set.

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

15 years agoTHRIFT-533. Fix write:offset:length: to ensure all requested data is written.
Andrew McGeachie [Tue, 21 Jul 2009 15:34:07 +0000 (15:34 +0000)] 
THRIFT-533.  Fix write:offset:length: to ensure all requested data is written.

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

15 years agoTHRIFT-344. Add a 'log_unexpected' option to the cocoa generator. off by default...
Andrew McGeachie [Tue, 21 Jul 2009 15:30:16 +0000 (15:30 +0000)] 
THRIFT-344.  Add a 'log_unexpected' option to the cocoa generator.  off by default.  when supplied, unexpected field IDs and types are logged when reading a struct.

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

15 years agoTHRIFT-343. Import <Foundation/Foundation.h> instead of <Cocoa/Cocoa.h> to support...
Andrew McGeachie [Tue, 21 Jul 2009 14:45:12 +0000 (14:45 +0000)] 
THRIFT-343. Import <Foundation/Foundation.h> instead of <Cocoa/Cocoa.h> to support iPhone

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

15 years agoTHRIFT-59. Fix memory leak by releasing allocated objects after assigning to container.
Andrew McGeachie [Tue, 21 Jul 2009 14:33:17 +0000 (14:33 +0000)] 
THRIFT-59. Fix memory leak by releasing allocated objects after assigning to container.

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

15 years agoTHRIFT-535. py: Twisted Thrift protocol max length is too small (fix off-by-one error...
Esteve Fernandez [Fri, 17 Jul 2009 18:35:52 +0000 (18:35 +0000)] 
THRIFT-535. py: Twisted Thrift protocol max length is too small (fix off-by-one error in MAX_LENGTH)

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

15 years agoTHRIFT-535. py: Twisted Thrift protocol max length is too small
Esteve Fernandez [Fri, 17 Jul 2009 18:18:19 +0000 (18:18 +0000)] 
THRIFT-535. py: Twisted Thrift protocol max length is too small

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

15 years agoTHRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test
T Jake Luciani [Fri, 17 Jul 2009 01:37:01 +0000 (01:37 +0000)] 
THRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test

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

15 years agoTHRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test
T Jake Luciani [Fri, 17 Jul 2009 01:34:50 +0000 (01:34 +0000)] 
THRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test

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

15 years agoTHRIFT-543. java: Generate normal style java files should respect the "optional"...
Bryan Duxbury [Tue, 14 Jul 2009 01:42:09 +0000 (01:42 +0000)] 
THRIFT-543. java: Generate normal style java files should respect the "optional" keyword when serializing

As the summary suggests, this patch causes "optional" fields to be skipped if they are unset, even if they are primitives. As this patch is for the non-beans style generator, the user is expected to maintain the set/unset status themselves.

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

15 years agoTHRIFT-350. php: Fix the extension build when C++ is not already used
David Reiss [Mon, 13 Jul 2009 17:21:03 +0000 (17:21 +0000)] 
THRIFT-350. php: Fix the extension build when C++ is not already used

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

15 years agoTHRIFT-525. csharp: ThriftTest project will not generate c# from .thrift file or...
Bryan Duxbury [Thu, 2 Jul 2009 20:28:33 +0000 (20:28 +0000)] 
THRIFT-525. csharp: ThriftTest project will not generate c# from .thrift file or generate ThriftImpl.dll

C# test project correctly references directories with spaces and deletes only data it generates

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

15 years agoTHRIFT-531. csharp: C# project and solution files reference external source control...
Bryan Duxbury [Thu, 2 Jul 2009 20:18:12 +0000 (20:18 +0000)] 
THRIFT-531. csharp: C# project and solution files reference external source control system

This patch removes the external source providers from all csproj and sln files.

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

15 years agoTHRIFT-204. csharp: C# Partial Classes
Bryan Duxbury [Thu, 2 Jul 2009 20:15:05 +0000 (20:15 +0000)] 
THRIFT-204. csharp: C# Partial Classes

C# structs are now generated as partial classes so they can be extended without wrapping.

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

15 years agoTHRIFT-526. rb: Generated Ruby enums have no good way to get the names back out once...
Bryan Duxbury [Wed, 24 Jun 2009 17:55:53 +0000 (17:55 +0000)] 
THRIFT-526. rb: Generated Ruby enums have no good way to get the names back out once you have a number.

enums generated in Ruby will now have a static map of enum values to names.

Patch by Adam Coffman (with slight modifications).

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

15 years agoTHRIFT-524. erlang: Decapitalize file names in include directives
David Reiss [Thu, 18 Jun 2009 23:30:03 +0000 (23:30 +0000)] 
THRIFT-524. erlang: Decapitalize file names in include directives

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

15 years agoTHRIFT-378. java: Java servers do not turn internal errors into thrift exceptions
Bryan Duxbury [Wed, 17 Jun 2009 16:43:25 +0000 (16:43 +0000)] 
THRIFT-378. java: Java servers do not turn internal errors into thrift exceptions

This patch causes Java servers to log internal server errors and return an INTERNAL_ERROR exception instead of just closing the connection.

Author: Jonathan Ellis

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

15 years agoTHRIFT-462. java: Installed jar shouldn't be executable
David Reiss [Thu, 4 Jun 2009 02:05:25 +0000 (02:05 +0000)] 
THRIFT-462. java: Installed jar shouldn't be executable

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

15 years agoTHRIFT-211. erlang: Modify test_tether to test protocol error handling as well
David Reiss [Thu, 4 Jun 2009 02:01:35 +0000 (02:01 +0000)] 
THRIFT-211. erlang: Modify test_tether to test protocol error handling as well

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

15 years agoTHRIFT-211. erlang: Support "tethered" clients
David Reiss [Thu, 4 Jun 2009 02:01:32 +0000 (02:01 +0000)] 
THRIFT-211. erlang: Support "tethered" clients

Add a client option that causes clients to monitor their creators
and terminate when the creator dies.  This makes it possible to
prevent client leaks without linking, because the latter causes
application code to be killed when a transport error occurs and
exits are not trapped.

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

15 years agoTHRIFT-211. erlang: Allow clients to be created without connecting
David Reiss [Thu, 4 Jun 2009 02:01:28 +0000 (02:01 +0000)] 
THRIFT-211. erlang: Allow clients to be created without connecting

Add a client option to prevent the initial connect (which causes
the protocol factory to be ignored).  The main use case for this
is testing the proper handling of clients that cannot connect.
Update the tether test to use this feature instead of a raw
gen_server:start call.

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

15 years agoTHRIFT-211. erlang: Support unlinked Thrift clients.
David Reiss [Thu, 4 Jun 2009 02:01:24 +0000 (02:01 +0000)] 
THRIFT-211. erlang: Support unlinked Thrift clients.

- Create a thrift_client:start function that accepts client options.
- Make start_link a wrapper that adds {monitor, link}.
- Add a test to make sure that everything dies or doesn't die as expected.
  (The test has to be run manually.)

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

15 years agoTHRIFT-469. cpp: Fix a bug in TimerManager::add
David Reiss [Thu, 4 Jun 2009 00:32:57 +0000 (00:32 +0000)] 
THRIFT-469. cpp: Fix a bug in TimerManager::add

The old code didn't notify waiters when the inserted task's timeout
was less than the current timeout because it didn't check the task map
to find the lowest timeout until after the new task was inserted.

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

15 years agoTHRIFT-466. cpp: Make the concurrency library test more thorough
David Reiss [Thu, 4 Jun 2009 00:32:54 +0000 (00:32 +0000)] 
THRIFT-466. cpp: Make the concurrency library test more thorough

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

15 years agoTHRIFT-465. cpp: Fix some STL misuse in the concurrency library test
David Reiss [Thu, 4 Jun 2009 00:32:50 +0000 (00:32 +0000)] 
THRIFT-465. cpp: Fix some STL misuse in the concurrency library test

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

15 years agoTHRIFT-464. cpp: Fix some STL misuse in the concurrency library
David Reiss [Thu, 4 Jun 2009 00:32:47 +0000 (00:32 +0000)] 
THRIFT-464. cpp: Fix some STL misuse in the concurrency library

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

15 years agoTHRIFT-497. cpp: Fix TSocket::read and peek on Max OS
David Reiss [Thu, 4 Jun 2009 00:10:50 +0000 (00:10 +0000)] 
THRIFT-497. cpp: Fix TSocket::read and peek on Max OS

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

15 years agoTHRIFT-511. rb: Better performing hash method for generated structs
Bryan Duxbury [Fri, 29 May 2009 20:18:58 +0000 (20:18 +0000)] 
THRIFT-511. rb: Better performing hash method for generated structs

This patch uses a hash function that takes into account the hashes of struct elements, instead of just returning 0. This make hashes of Thrift structs O(1) instead of O(n).

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

15 years agoTHRIFT-489. java: Java enum validation only validates explicitly assigned values
Bryan Duxbury [Fri, 29 May 2009 20:15:02 +0000 (20:15 +0000)] 
THRIFT-489. java: Java enum validation only validates explicitly assigned values

This patch puts all of an enum's values into the valid values set, fixing validation.

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

15 years agoTHRIFT-513. rb: spec test files broken, rake searching for misnamed files
Bryan Duxbury [Fri, 29 May 2009 20:11:27 +0000 (20:11 +0000)] 
THRIFT-513. rb: spec test files broken, rake searching for misnamed files

This patch causes the right files to be required and cleans up a few odd or redundant requires that were in the specs.

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

15 years agoTHRIFT-516. rb: If TFramedTransport reads a negative frame size, throw a TTransportEx...
Bryan Duxbury [Fri, 22 May 2009 20:17:04 +0000 (20:17 +0000)] 
THRIFT-516. rb: If TFramedTransport reads a negative frame size, throw a TTransportException descendant instead of the default NegativeArraySizeException

Throw a TTransportException when the frame size read from the wire is < 0.

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

15 years agoTHRIFT-373. Get some missing files into the release tarballs
David Reiss [Fri, 22 May 2009 19:52:06 +0000 (19:52 +0000)] 
THRIFT-373. Get some missing files into the release tarballs

- Added some stuff to EXTRA_DIST.
- Added some non-compiled sources to a C++ test.
- Made lib/perl/test a SUBDIR of lib/perl.

The last is a revert of r766558, but I moved the "Types.pm" rules in
lib/perl/test/Makefile.am to the check-local target, so it should still
work as expected (per THRIFT-461).

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

15 years agoConsolidate lib/hs/.gitignore into the top-level .gitignore
David Reiss [Fri, 22 May 2009 19:52:02 +0000 (19:52 +0000)] 
Consolidate lib/hs/.gitignore into the top-level .gitignore

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

15 years agoTHRIFT-450. java: Propagate CLASSPATH from ./configure to make and ant
David Reiss [Fri, 22 May 2009 19:50:33 +0000 (19:50 +0000)] 
THRIFT-450. java: Propagate CLASSPATH from ./configure to make and ant

- Put "AC_SUBST(CLASSPATH)" configure.ac so the CLASSPATH used to run
  ./configure is passed in to make.
- Put "export CLASSPATH" in lib/java/Makefile.am so that the CLASSPATH
  passed to make is passed to ant.

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

15 years agoTHRIFT-450. java: Respect the global classpath during testing
David Reiss [Fri, 22 May 2009 19:50:32 +0000 (19:50 +0000)] 
THRIFT-450. java: Respect the global classpath during testing

I'm not sure why, but "ant test" under lib/java doesn't pass the
global classpath to the test programs.  (This is weird because
compile-test does.)  This change manually extracts the CLASSPATH
environment variable and adds it to the test classpath.

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

15 years agoTHRIFT-450. java: Check for Apache Commons Lang also
David Reiss [Fri, 22 May 2009 19:50:29 +0000 (19:50 +0000)] 
THRIFT-450. java: Check for Apache Commons Lang also

I forgot that we use the hashcode option when building the tests.
We therefore need to check for HashCodeBuilder before disabling Ivy.

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

15 years agocpp: Fix compilation on OpenBSD by including sys/types.h
David Reiss [Thu, 21 May 2009 02:28:36 +0000 (02:28 +0000)] 
cpp: Fix compilation on OpenBSD by including sys/types.h

socket(2) says that this might be required on some Unixes.

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

15 years agocpp: Resolve an ambiguous overload in some tests
David Reiss [Thu, 21 May 2009 02:28:30 +0000 (02:28 +0000)] 
cpp: Resolve an ambiguous overload in some tests

sqrt is defined for floats and long doubles in addition to doubles.
Add a cast (from int) to specify which one we want.

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

15 years agocpp: Add some missing includes to fix OpenBSD compilation
David Reiss [Thu, 21 May 2009 02:28:27 +0000 (02:28 +0000)] 
cpp: Add some missing includes to fix OpenBSD compilation

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

15 years agocpp: Fix an OpenBSD compilation bug by moving a typedef
David Reiss [Thu, 21 May 2009 02:28:23 +0000 (02:28 +0000)] 
cpp: Fix an OpenBSD compilation bug by moving a typedef

The typedef was aliasing a private type, which is apparently illegal.
Moving it into the class definition fixed it.

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

15 years agocpp: Deal with systems without sched_get_priority_{min,max} (OpenBSD)
David Reiss [Thu, 21 May 2009 02:28:19 +0000 (02:28 +0000)] 
cpp: Deal with systems without sched_get_priority_{min,max} (OpenBSD)

Also make a few tweaks to configure.ac:
- Check for clock_gettime in librt since it seems to be more
  widely available.
- Make it clear which AC_CHECK_FUNCS are optional.

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

15 years agocpp: Deal with systems without AI_ADDRCONFIG (OpenBSD)
David Reiss [Thu, 21 May 2009 02:28:16 +0000 (02:28 +0000)] 
cpp: Deal with systems without AI_ADDRCONFIG (OpenBSD)

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

15 years agocpp: Fix an OpenBSD compilation error that appears to be a real bug
David Reiss [Thu, 21 May 2009 02:28:14 +0000 (02:28 +0000)] 
cpp: Fix an OpenBSD compilation error that appears to be a real bug

The (Linux) man page for ctime_r states pretty clearly that
the buffer it uses must have space for at least 26 characters.

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

15 years agoTHRIFT-501. rb: File.dirname(...) requires cause warnings in some scenarios
Bryan Duxbury [Wed, 20 May 2009 18:22:19 +0000 (18:22 +0000)] 
THRIFT-501. rb: File.dirname(...) requires cause warnings in some scenarios

This patch removes the File.dirname usage. Instead, you should put the directory that contains your _types.rb into the load path.

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

16 years agoTHRIFT-450. Don't use Ivy if log4j is already available
David Reiss [Tue, 12 May 2009 23:16:55 +0000 (23:16 +0000)] 
THRIFT-450. Don't use Ivy if log4j is already available

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

16 years agoExtend ax_javac_and_java.m4 to test for specific classes
David Reiss [Tue, 12 May 2009 23:16:53 +0000 (23:16 +0000)] 
Extend ax_javac_and_java.m4 to test for specific classes

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

16 years agoTHRIFT-349. php: Accelerated binary protocol serialization segementation fault
Bryan Duxbury [Tue, 12 May 2009 16:53:23 +0000 (16:53 +0000)] 
THRIFT-349. php: Accelerated binary protocol serialization segementation fault

Check to make sure that the object being serialized has a valid struct spec, error otherwise.

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

16 years agoTHRIFT-499. php: Thrift_protocol PHP extension does not handle signedness correctly
Bryan Duxbury [Tue, 12 May 2009 16:44:52 +0000 (16:44 +0000)] 
THRIFT-499. php: Thrift_protocol PHP extension does not handle signedness correctly

Cast all the number types to signed values before making PHP longs out of them.

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

16 years agoTHRIFT-495. python: Raise a TTransportException if TSocket is not open
David Reiss [Tue, 12 May 2009 02:17:43 +0000 (02:17 +0000)] 
THRIFT-495. python: Raise a TTransportException if TSocket is not open

Previously, TSocket.write would raise an AttributeError if the transport
had not been opened.  A TTransportException with the code set to
NOT_OPEN is more appropriate.  The cost of the check should be
negligible, since TSocket.write is already fairly expensive (it does a
system call).

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

16 years agoTHRIFT-493. java: Stopping TNonblockingServer when it hasn't been starting results...
Bryan Duxbury [Mon, 11 May 2009 18:09:24 +0000 (18:09 +0000)] 
THRIFT-493. java: Stopping TNonblockingServer when it hasn't been starting results in an exception

Check if the server is null before trying to stop.

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

16 years agoTHRIFT-494. python: Update meta-information in setup.py
David Reiss [Sun, 10 May 2009 05:14:44 +0000 (05:14 +0000)] 
THRIFT-494. python: Update meta-information in setup.py

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

16 years agoTHRIFT-490. Clarify the comment for the Guard macro
David Reiss [Thu, 7 May 2009 00:41:18 +0000 (00:41 +0000)] 
THRIFT-490. Clarify the comment for the Guard macro

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

16 years agoTHRIFT-483. Use --copy for libtoolize
David Reiss [Wed, 6 May 2009 22:00:33 +0000 (22:00 +0000)] 
THRIFT-483. Use --copy for libtoolize

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

16 years agoTHRIFT-482. java: build.xml does not specify a target version for compiled java classes
Bryan Duxbury [Wed, 6 May 2009 17:22:11 +0000 (17:22 +0000)] 
THRIFT-482. java: build.xml does not specify a target version for compiled java classes

This patch updates the build file to target java 1.5.

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

16 years agoTHRIFT-486. rb: ruby tutorial needs updated require statements
Bryan Duxbury [Tue, 5 May 2009 18:59:49 +0000 (18:59 +0000)] 
THRIFT-486. rb: ruby tutorial needs updated require statements

Fixed.

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

16 years agoTHRIFT-485. rb: Generated validate methods that reference external thrift files...
Bryan Duxbury [Tue, 5 May 2009 18:50:26 +0000 (18:50 +0000)] 
THRIFT-485. rb:  Generated validate methods that reference external thrift files' types are not referenced correctly

This patch fully qualifies type names in two spots.

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

16 years agoPreparing for 0.1.0 RC1
Kevin Clark [Tue, 5 May 2009 00:53:01 +0000 (00:53 +0000)] 
Preparing for 0.1.0 RC1

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

16 years agoTHRIFT-60. Make generated constants object extend NSObject.
Andrew McGeachie [Tue, 5 May 2009 00:44:48 +0000 (00:44 +0000)] 
THRIFT-60.  Make generated constants object extend NSObject.

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

16 years agoAdd version number to Rakefile, update generated manifest (via rake)
Kevin Clark [Tue, 5 May 2009 00:43:59 +0000 (00:43 +0000)] 
Add version number to Rakefile, update generated manifest (via rake)

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

16 years agoAdding incubator disclaimer
Kevin Clark [Mon, 4 May 2009 22:00:47 +0000 (22:00 +0000)] 
Adding incubator disclaimer

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

16 years agoTHRIFT-478. Release our input and output stream instance variables when we're dealloc...
Andrew McGeachie [Mon, 4 May 2009 21:17:55 +0000 (21:17 +0000)] 
THRIFT-478. Release our input and output stream instance variables when we're dealloc to avoid a memory leak.

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

16 years agoTHRIFT-471. python: Generated exceptions should implement __str__
David Reiss [Wed, 29 Apr 2009 23:35:01 +0000 (23:35 +0000)] 
THRIFT-471. python: Generated exceptions should implement __str__

This makes Python stack dumps properly show the exception content.

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

16 years agoTHRIFT-453. java: By default, use Ivy to download Java dependencies
David Reiss [Wed, 29 Apr 2009 23:20:56 +0000 (23:20 +0000)] 
THRIFT-453. java: By default, use Ivy to download Java dependencies

build.xml will now download Apache Ivy into the build tree.  Ivy will
then be used to download the other Java dependencies: log4j and Apache
Commons Lang.  This achieves the goal of allowing the Java library to be
built from a clean checkout, without requiring users to manually obtain
dependencies or checking external binaries into the source tree.

The Ivy behavior (except for a few mkdir calls) can be inhibited by
passing -Dnoivy= on the ant command line (or in a property file).  In
this case, log4j must be available in the user's CLASSPATH.

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

16 years agoTHRIFT-470. fb303: Use a namespace in Perl gen-code
David Reiss [Wed, 29 Apr 2009 04:54:24 +0000 (04:54 +0000)] 
THRIFT-470. fb303: Use a namespace in Perl gen-code

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

16 years agoTHRIFT-463. python: Fix thrift_spec ordering bug from r760201
David Reiss [Mon, 27 Apr 2009 19:36:50 +0000 (19:36 +0000)] 
THRIFT-463. python: Fix thrift_spec ordering bug from r760201

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

16 years agoTHRIFT-467. csharp: Fix compilation on Debian Sid
David Reiss [Mon, 27 Apr 2009 19:25:23 +0000 (19:25 +0000)] 
THRIFT-467. csharp: Fix compilation on Debian Sid

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