common/thrift.git
16 years agoTHRIFT-223 Validate method should check that enum types are assigned valid values
Bryan Duxbury [Tue, 20 Jan 2009 01:54:14 +0000 (01:54 +0000)] 
THRIFT-223 Validate method should check that enum types are assigned valid values

Enum classes now get a VALID_VALUES Set that contains all of the acceptable values. Structs' validate() method has been extended to compare an enum field's value to the valid value set, but only if the __isset flag for that field is true, meaning that non-beans generated code will not perform this validity check unless the __isset flag is manually maintained.

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

16 years agoTHRIFT-224 Validate method should check that enum types are assigned valid values
Bryan Duxbury [Fri, 16 Jan 2009 22:34:40 +0000 (22:34 +0000)] 
THRIFT-224 Validate method should check that enum types are assigned valid values
Each generated enumeration type will now have a VALID_VALUES Set as a static member that contains all the values of the enumeration.

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

16 years agoTHRIFT-271: allows build to locate libevent on osx
T Jake Luciani [Fri, 16 Jan 2009 01:04:27 +0000 (01:04 +0000)] 
THRIFT-271: allows build to locate libevent on osx

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

16 years agoTHRIFT-244. cpp: Make TJSONProtocolFactor inherit from TProtocolFactory
David Reiss [Thu, 15 Jan 2009 23:56:24 +0000 (23:56 +0000)] 
THRIFT-244. cpp: Make TJSONProtocolFactor inherit from TProtocolFactory

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

16 years agoTHRIFT-244. cpp: Fix TJSONProtocol::writeMessageBegin
David Reiss [Thu, 15 Jan 2009 23:56:19 +0000 (23:56 +0000)] 
THRIFT-244. cpp: Fix TJSONProtocol::writeMessageBegin

uint8_t is a character type, so lexical_cast doesn't convert it
to an integer representation.

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

16 years agoTHRIFT-34 Java libraries should be namespaced under org.apache.thrift, not com.facebo...
Bryan Duxbury [Thu, 15 Jan 2009 23:47:51 +0000 (23:47 +0000)] 
THRIFT-34 Java libraries should be namespaced under org.apache.thrift, not com.facebook.thrift

Library classes and tests have been moved to the proper package and directory structure, and references to com.facebook.thrift where replaced with org.apache.thrift throughout the code. The fb303 contrib project still contains com.facebook packages.

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

16 years agoTHRIFT-216. Add validate method to fixtures so tests pass
Kevin Clark [Wed, 14 Jan 2009 23:55:10 +0000 (23:55 +0000)] 
THRIFT-216. Add validate method to fixtures so tests pass

Author: Esteve Fernandez

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

16 years agoTHRIFT-242. python: Used named arguments in __init__ instead of a dict
David Reiss [Wed, 14 Jan 2009 22:34:15 +0000 (22:34 +0000)] 
THRIFT-242. python: Used named arguments in __init__ instead of a dict

This is a wire-compatible but non-source-compatible change.
When initializing structures, you must use

Foo(bar=1, baz="qux")
Foo(**{"bar": 1, "baz": "qux"})

instead of

Foo({"bar": 1, "baz": "qux"})

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

16 years agoTHRIFT-249. java: Add @param lines to function docstrings
David Reiss [Tue, 6 Jan 2009 20:54:27 +0000 (20:54 +0000)] 
THRIFT-249. java: Add @param lines to function docstrings

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

16 years agoTHRIFT-129. csharp: Make all Thrift structures extend TBase
David Reiss [Tue, 6 Jan 2009 19:49:33 +0000 (19:49 +0000)] 
THRIFT-129. csharp: Make all Thrift structures extend TBase

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

16 years agoTHRIFT-46. csharp: Throw the correct exception for an unknown method
David Reiss [Tue, 6 Jan 2009 19:49:29 +0000 (19:49 +0000)] 
THRIFT-46. csharp: Throw the correct exception for an unknown method

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

16 years agoTHRIFT-25. csharp: Various compiler and library improvements
David Reiss [Tue, 6 Jan 2009 19:49:22 +0000 (19:49 +0000)] 
THRIFT-25. csharp: Various compiler and library improvements

Compiler:
- Thrift structures are serializable.
- The member fields of thrift structures are now private and only accessible
  through Properties, which keep the appropriate __isset up to date.

Library
- Addition of TBufferedTransport, which can be used to wrap other Transports.
- Addition of TThreadedServer, which manually manages threads instead of
  relying on .NET ThreadPool.
- Servers use a log delegate that defaults to System.Console but allows
  servers to use log4net without introducing the dependency.

ThriftTest Visual Studio Project
- Test client and server that use ThriftTest.thrift. The project references
  thrift.exe and Thrift.dll from the subversion tree and automatically builds
  generated code. This makes it very easy to test changes in both the compiler
  and library.

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

16 years agoTHRIFT-246. rb: Generate #struct_fields rather than reflect.
Kevin Clark [Tue, 6 Jan 2009 01:34:28 +0000 (01:34 +0000)] 
THRIFT-246. rb: Generate #struct_fields rather than reflect.

Author: Bryan Duxbury

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

16 years agoTHRIFT-157. rb: Quote strings and qualify class names properly
Kevin Clark [Mon, 5 Jan 2009 23:10:17 +0000 (23:10 +0000)] 
THRIFT-157. rb: Quote strings and qualify class names properly

Author: Dave Engberg

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

16 years agoTHRFIT-231. rb: Make Thrift::Structs hashable
Kevin Clark [Mon, 5 Jan 2009 23:00:22 +0000 (23:00 +0000)] 
THRFIT-231. rb: Make Thrift::Structs hashable

Author: Bryan Duxbury

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

16 years agoTHRIFT-235. java: Explicitly cast integer constants to double
David Reiss [Mon, 5 Jan 2009 21:03:01 +0000 (21:03 +0000)] 
THRIFT-235. java: Explicitly cast integer constants to double

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

16 years agoTHRIFT-222. java: Better exposure if __isset in beans style
David Reiss [Mon, 5 Jan 2009 21:02:58 +0000 (21:02 +0000)] 
THRIFT-222. java: Better exposure if __isset in beans style

- Generate an isSet method for each field to test its set-ness.
- Generate a generic isSet method that checks by field id.

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

16 years agojava: Add a helper function to implement nocamel style
David Reiss [Mon, 5 Jan 2009 21:02:55 +0000 (21:02 +0000)] 
java: Add a helper function to implement nocamel style

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

16 years agoTHRIFT-191. java: Create a static field id -> name map for each struct
David Reiss [Mon, 5 Jan 2009 21:02:52 +0000 (21:02 +0000)] 
THRIFT-191. java: Create a static field id -> name map for each struct

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

16 years agoTHRIFT-138. java: Fix copy constructor for binary fields
David Reiss [Mon, 5 Jan 2009 21:02:48 +0000 (21:02 +0000)] 
THRIFT-138. java: Fix copy constructor for binary fields

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

16 years agoTHRIFT-241. python: Generate a better implementation of __repr__
David Reiss [Mon, 5 Jan 2009 20:14:52 +0000 (20:14 +0000)] 
THRIFT-241. python: Generate a better implementation of __repr__

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

16 years agoTHRIFT-193: Patch for proper namespace support in perl compiler
T Jake Luciani [Tue, 23 Dec 2008 03:45:43 +0000 (03:45 +0000)] 
THRIFT-193: Patch for proper namespace support in perl compiler

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

16 years agoTHRIFT-2: check for thrift::socket handle being null
T Jake Luciani [Tue, 23 Dec 2008 03:12:50 +0000 (03:12 +0000)] 
THRIFT-2: check for thrift::socket handle being null

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

16 years agoTHRIFT-208. Fix ax_java.m4 for Ubuntu 8.10
David Reiss [Mon, 22 Dec 2008 19:54:12 +0000 (19:54 +0000)] 
THRIFT-208. Fix ax_java.m4 for Ubuntu 8.10

On Ubuntu 8.10, /bin/sh is a symlink to dash (a minimal
Bourne-compatible shell).  ./configure is smart enough
to detect when the shell it is run with is missing features.
In such cases, it switches to a more capable shell (like bash).
This causes it to enable certain shell constructs that are
not supported by dash.  However, the Autoconf macro file that
we use to detect Java support interacts poorly with Autoconf
because it uses divert(-1) for large comments.  This somehow
causes configure to set SHELL to /bin/sh.  As a result, the
libtool script generated during the build process is not
compatible with the shell that is used to run it (if a recent
version of libtool is in use).

This change replaces all of the "divert(-1)" comments
with more traditional "dnl" comments.  This allows Thrift
to build on Ubuntu 8.10.

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

16 years agoTHRIFT-190. Added dependency check to perl Makefile
T Jake Luciani [Mon, 22 Dec 2008 13:13:56 +0000 (13:13 +0000)] 
THRIFT-190. Added dependency check to perl Makefile

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

16 years agoTHRIFT-220. Add some stuff to svn:ignore
David Reiss [Tue, 16 Dec 2008 20:31:26 +0000 (20:31 +0000)] 
THRIFT-220. Add some stuff to svn:ignore

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

16 years agoTHRIFT-225. java/cpp: Handle non-i32 integer constants properly
David Reiss [Tue, 16 Dec 2008 20:28:13 +0000 (20:28 +0000)] 
THRIFT-225. java/cpp: Handle non-i32 integer constants properly

Java generates a warning when converting from an integer constant
to a byte or short without an explicit cast.  This change adds a
cast to byte and short literals in Java.

Both Java and C++ fail to compile integer literals larger than 2^31
unless they are decorated with "L" (for Java) or "LL" (for g++).
This change adds the appropriate decorations.

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

16 years agorb: Thrift.check_type should check struct classes [THRIFT-185]
Kevin Clark [Sat, 13 Dec 2008 02:39:20 +0000 (02:39 +0000)] 
rb: Thrift.check_type should check struct classes [THRIFT-185]

Author: Piotr Kozikowski

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

16 years agoTHRIFT-121. Support arbitrary type annotations
David Reiss [Wed, 10 Dec 2008 01:52:48 +0000 (01:52 +0000)] 
THRIFT-121. Support arbitrary type annotations

Adds syntax for attaching arbitrary key/value pairs to types.
These annotations can be accessed by individual generators to alter
the code they produce.

This version supports annotations on container types and structures.

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

16 years agoTHRIFT-203. cpp: Make library headers compile under g++ -pedantic
David Reiss [Fri, 5 Dec 2008 02:54:09 +0000 (02:54 +0000)] 
THRIFT-203. cpp: Make library headers compile under g++ -pedantic

It turns out that trailing commas in enum definitions are
not actually valid C++.

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

16 years agoTHRIFT-214. cpp: Qualify a cast to fix OSX compilation
David Reiss [Tue, 2 Dec 2008 02:32:25 +0000 (02:32 +0000)] 
THRIFT-214. cpp: Qualify a cast to fix OSX compilation

id_t is defined in some OSX header, and the id_t in this function
resolved to that one instead of Thread::id_t.  This change fully
qualifies the type to make sure it resolves properly.

Also remove a comment about eliminating the C-style cast, since it
is actually quite appropriate in this case.

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

16 years agoTHRIFT-215. cpp: Disable an assertion that fails on various platforms
David Reiss [Tue, 2 Dec 2008 02:22:01 +0000 (02:22 +0000)] 
THRIFT-215. cpp: Disable an assertion that fails on various platforms

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

16 years agoTHRIFT-217. Use "--gen py" instead of "-py" in build scripts
David Reiss [Tue, 2 Dec 2008 02:11:13 +0000 (02:11 +0000)] 
THRIFT-217. Use "--gen py" instead of "-py" in build scripts

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

16 years agoTHRIFT-138. java: Create deep-copy constructors for Thrift structs
David Reiss [Tue, 2 Dec 2008 02:06:31 +0000 (02:06 +0000)] 
THRIFT-138. java: Create deep-copy constructors for Thrift structs

- Create a copy constructor for every Thrift struct.  The constructor
  performs a deep copy on the argument, resulting in no shared state.
- Make thrift structions implement Cloneable and implement .clone()
  using the copy constructor.

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

16 years agoTHRIFT-81. java: TNonblockingServer: Support a limit on read buffer size
David Reiss [Fri, 21 Nov 2008 23:07:05 +0000 (23:07 +0000)] 
THRIFT-81. java: TNonblockingServer: Support a limit on read buffer size

This change makes it possible to set a maximum amount of memory that
TNonblockingServer will use for all read buffers (combined).
If it is exceeded, no new data will be read from clients until
memory is freed.  The current implementation does a busy wait in
the main thread when this happens.

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

16 years agoTHRIFT-142. java: Better handling of required fields
David Reiss [Fri, 21 Nov 2008 21:55:52 +0000 (21:55 +0000)] 
THRIFT-142. java: Better handling of required fields

- On reading, behave the same way as the C++ code:
  throw an exception if a required field is missing.
- In addition, throw an exception if a required field is missing
  when writing.  For the JavaBeans code, this means that __isset
  is false (because it is maintained automatically).  For non-beans
  code, this means that the field is null.  Non-nullable fields are
  not checked in non-beans code.

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

16 years agoTHRIFT-194. cpp: Properlyl namespace exception types in catch
David Reiss [Fri, 21 Nov 2008 21:36:41 +0000 (21:36 +0000)] 
THRIFT-194. cpp: Properlyl namespace exception types in catch

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

16 years agoTHRIFT-172. java: Improve toString output for binary fields
David Reiss [Fri, 21 Nov 2008 21:31:36 +0000 (21:31 +0000)] 
THRIFT-172. java: Improve toString output for binary fields

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

16 years agoTHRIFT-139. java: Fix indentation in beans mode
David Reiss [Fri, 21 Nov 2008 20:25:14 +0000 (20:25 +0000)] 
THRIFT-139. java: Fix indentation in beans mode

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

16 years agoTHRIFT-202: java: Fix "make check"
David Reiss [Thu, 20 Nov 2008 22:22:23 +0000 (22:22 +0000)] 
THRIFT-202: java: Fix "make check"

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

16 years agoRemove compiler/cpp/version.h in "make clean"
David Reiss [Thu, 20 Nov 2008 21:24:32 +0000 (21:24 +0000)] 
Remove compiler/cpp/version.h in "make clean"

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

16 years agoFix "make distclean" when Ruby is not in use
David Reiss [Thu, 20 Nov 2008 21:24:18 +0000 (21:24 +0000)] 
Fix "make distclean" when Ruby is not in use

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

16 years agorb: Remove extra validate in read [THRIFT-207]
Kevin Clark [Wed, 19 Nov 2008 23:24:12 +0000 (23:24 +0000)] 
rb: Remove extra validate in read [THRIFT-207]

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

16 years agoMerge branch 'THRIFT-143'
Kevin Clark [Fri, 14 Nov 2008 17:11:39 +0000 (17:11 +0000)] 
Merge branch 'THRIFT-143'

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

16 years agorb: Validate struct _after_ read. [THRIFT-206]
Kevin Clark [Fri, 14 Nov 2008 17:09:52 +0000 (17:09 +0000)] 
rb: Validate struct _after_ read. [THRIFT-206]

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

16 years agorb: raise if an object is serialized without required fields [THRIFT-143]
Kevin Clark [Tue, 11 Nov 2008 05:46:04 +0000 (05:46 +0000)] 
rb: raise if an object is serialized without required fields [THRIFT-143]

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

16 years agoTHRIFT-67. python: Add TNonblockingServer
David Reiss [Fri, 7 Nov 2008 23:09:31 +0000 (23:09 +0000)] 
THRIFT-67. python: Add TNonblockingServer

This TNonblockingServer is very similar to the C++ implementation.
It assumes the framed transport, but it uses select instead of libevent.

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

16 years agorb: Performance tweaks in Struct#initialize [THRIFT-188]
Kevin Clark [Fri, 31 Oct 2008 00:39:20 +0000 (00:39 +0000)] 
rb: Performance tweaks in Struct#initialize [THRIFT-188]

Author: Bryan Duxbury

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

16 years agorb: Add docstrings to generated ruby code [THRIFT-147]
Kevin Clark [Fri, 31 Oct 2008 00:32:25 +0000 (00:32 +0000)] 
rb: Add docstrings to generated ruby code [THRIFT-147]

Author: Bryan Duxbury

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

16 years agoTHRIFT-186. erl: Make the Makefile work on OpenSolaris
David Reiss [Thu, 30 Oct 2008 04:28:42 +0000 (04:28 +0000)] 
THRIFT-186. erl: Make the Makefile work on OpenSolaris

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

16 years agoTHRIFT-168. cpp: Clear transport buffers before a flush
David Reiss [Wed, 29 Oct 2008 22:50:34 +0000 (22:50 +0000)] 
THRIFT-168. cpp: Clear transport buffers before a flush

Previously, TBufferedTransport and TFramedTransport could
leave data in their buffers if a flush threw an exception.
This patch makes them reset their internal pointers before
flushing to the underlying transport.

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

16 years agoTHRIFT-179. java: Include per-field docstrings in generated code
David Reiss [Wed, 29 Oct 2008 00:07:49 +0000 (00:07 +0000)] 
THRIFT-179. java: Include per-field docstrings in generated code

This also involves refactoring a bit of the functionality into
t_oop_generator.

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

16 years agoMake t_field inherit from t_doc instead of reimplementing it
David Reiss [Wed, 29 Oct 2008 00:07:45 +0000 (00:07 +0000)] 
Make t_field inherit from t_doc instead of reimplementing it

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

16 years agoTHRIFT-183 let non-root issues run fb303 status commands
Mark Slee [Mon, 27 Oct 2008 22:45:26 +0000 (22:45 +0000)] 
THRIFT-183 let non-root issues run fb303 status commands

Reviewed By: mcslee

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

16 years agoMake a pointer const to fix a warning
David Reiss [Wed, 22 Oct 2008 22:07:03 +0000 (22:07 +0000)] 
Make a pointer const to fix a warning

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

16 years agoAdd a missing include to fix compilation on Ubuntu 8.10
David Reiss [Wed, 22 Oct 2008 22:07:00 +0000 (22:07 +0000)] 
Add a missing include to fix compilation on Ubuntu 8.10

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

16 years agoAdd more files to .gitignore
David Reiss [Wed, 22 Oct 2008 21:59:15 +0000 (21:59 +0000)] 
Add more files to .gitignore

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

16 years agoMake .gitignore more specific
David Reiss [Wed, 22 Oct 2008 21:59:12 +0000 (21:59 +0000)] 
Make .gitignore more specific

The leading slashes prevent it from matching similar-looking paths
in subdirectories.

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

16 years agoTHRIFT-173. Commit the html generator
David Reiss [Tue, 21 Oct 2008 00:09:23 +0000 (00:09 +0000)] 
THRIFT-173. Commit the html generator

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

16 years agoTHRIFT-177. cpp: Add a missing "std::"
David Reiss [Mon, 20 Oct 2008 21:29:07 +0000 (21:29 +0000)] 
THRIFT-177. cpp: Add a missing "std::"

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

16 years agoTHRIFT-109. python: Use self.assert* instead of assert in tests
David Reiss [Fri, 17 Oct 2008 19:30:35 +0000 (19:30 +0000)] 
THRIFT-109. python: Use self.assert* instead of assert in tests

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

16 years agorb: Create constants for field ids in generated structs [THRIFT-165]
Kevin Clark [Thu, 16 Oct 2008 19:15:20 +0000 (19:15 +0000)] 
rb: Create constants for field ids in generated structs [THRIFT-165]

Author: Bryan Duxbury

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

16 years agorb: Update HTTPClientSpec for THRIFT-156
Kevin Clark [Thu, 16 Oct 2008 19:14:47 +0000 (19:14 +0000)] 
rb: Update HTTPClientSpec for THRIFT-156

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

16 years agorb: Support SSL and correct Content-Type in HTTPClient [THRIFT-156]
Kevin Clark [Wed, 15 Oct 2008 19:06:18 +0000 (19:06 +0000)] 
rb: Support SSL and correct Content-Type in HTTPClient [THRIFT-156]

Author: Dave Engberg

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

16 years agoTHRIFT-170: Buffered transports leave data in write buffer on failed flush
Mark Slee [Tue, 14 Oct 2008 22:05:11 +0000 (22:05 +0000)] 
THRIFT-170: Buffered transports leave data in write buffer on failed flush

Reviewed By: mcslee

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

16 years agoTHRIFT-169: Fixes framed/buffered transport state on underlying flush failure
Mark Slee [Tue, 14 Oct 2008 22:00:36 +0000 (22:00 +0000)] 
THRIFT-169: Fixes framed/buffered transport state on underlying flush failure

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

16 years agoTHRIFT-139. java: Expose field ids in more useful ways
David Reiss [Thu, 9 Oct 2008 00:08:46 +0000 (00:08 +0000)] 
THRIFT-139. java: Expose field ids in more useful ways

- Define constants in each structure class that provide access to the
  field ids by name (at compile time).  Use them for (de)serialization.
- For beans-mode code, generate a generic getter and setter for accessing
  fields by field id.

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

16 years agoTHRIFT-152. java: Set isset appropriately in structure constructors
David Reiss [Wed, 8 Oct 2008 04:49:25 +0000 (04:49 +0000)] 
THRIFT-152. java: Set isset appropriately in structure constructors

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

16 years agoFix a compile bug introduced by r702644
David Reiss [Tue, 7 Oct 2008 23:55:24 +0000 (23:55 +0000)] 
Fix a compile bug introduced by r702644

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

16 years agoTHRIFT-145. java: Make TNonblockingServer more robust against errors
David Reiss [Tue, 7 Oct 2008 23:03:47 +0000 (23:03 +0000)] 
THRIFT-145. java: Make TNonblockingServer more robust against errors

TNonblockingServer was throwing a null pointer exception in certain cases.
We're not really sure what the root cause is, but this change prevents
the exception and also improves logging of certain undesirable conditions.

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

16 years agoTHRIFT-149. cpp: Make TNonblockingServer handle a shut-down ThreadManager
David Reiss [Tue, 7 Oct 2008 21:39:19 +0000 (21:39 +0000)] 
THRIFT-149. cpp: Make TNonblockingServer handle a shut-down ThreadManager

This is a step toward implementing a graceful shutdown.

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

16 years agoTHRIFT-108. python: Fix call to PyDict_Next in fastbinary.c
David Reiss [Tue, 7 Oct 2008 21:08:10 +0000 (21:08 +0000)] 
THRIFT-108. python: Fix call to PyDict_Next in fastbinary.c

The position parameter is supposed to be a Py_ssize_t*, not an int*.
This was probably just an oversight in the original patch, and it
was preventing maps from serializing properly on x86-64.

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

16 years agoTHRIFT-119. java: structs' toString omits unset optional fields
David Reiss [Wed, 1 Oct 2008 18:32:47 +0000 (18:32 +0000)] 
THRIFT-119. java: structs' toString omits unset optional fields

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

16 years agoTHRIFT-120. java: Make the nocamel option work for more methods
David Reiss [Wed, 1 Oct 2008 03:24:54 +0000 (03:24 +0000)] 
THRIFT-120. java: Make the nocamel option work for more methods

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

16 years agoTHRIFT-100. java: Set __isset better in beans style
David Reiss [Wed, 1 Oct 2008 03:24:50 +0000 (03:24 +0000)] 
THRIFT-100. java: Set __isset better in beans style

When setX(null) is called on a structure, set __isset.x to false.

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

16 years agoPython generator exception namespacing, THRIFT-150
Mark Slee [Mon, 29 Sep 2008 22:01:30 +0000 (22:01 +0000)] 
Python generator exception namespacing, THRIFT-150

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

16 years agocontrib/fb303: Some changes to the build for the Scribe release
David Reiss [Sat, 20 Sep 2008 00:14:01 +0000 (00:14 +0000)] 
contrib/fb303: Some changes to the build for the Scribe release

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

16 years agoTHRIFT-130. java: Eliminate frame{Read,Write} from TFramedTransport
David Reiss [Thu, 4 Sep 2008 18:23:29 +0000 (18:23 +0000)] 
THRIFT-130. java: Eliminate frame{Read,Write} from TFramedTransport

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

16 years agorb: Add pretty inspect, optional field hint for Thrift::Struct
Kevin Clark [Tue, 26 Aug 2008 20:02:07 +0000 (20:02 +0000)] 
rb: Add pretty inspect, optional field hint for Thrift::Struct

Author: Bryan Duxbury

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

16 years agorb: Add FramedTransport#borrow/consume! [THRIFT-117]
Kevin Clark [Mon, 25 Aug 2008 22:16:45 +0000 (22:16 +0000)] 
rb: Add FramedTransport#borrow/consume! [THRIFT-117]

This addition makes FramedTransport BinaryProtocolAccelerated ready.

Author: Bryan Duxbury

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

16 years agorb: Speed up Struct#initialize for optional fields [THRFIT-112]
Kevin Clark [Mon, 25 Aug 2008 21:34:19 +0000 (21:34 +0000)] 
rb: Speed up Struct#initialize for optional fields [THRFIT-112]

Struct#initialize previously walked over every field and checked for
default values before assigning nil. The new approach assigns defaults
only to fields that have defaults, and lets Ruby handle nil ivars.

Author: Bryan Duxbury

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

16 years agoMerge branch 'THRIFT-103'
Kevin Clark [Mon, 4 Aug 2008 18:46:19 +0000 (18:46 +0000)] 
Merge branch 'THRIFT-103'

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

16 years agojava: Specify in build.xml that we are using Java 1.5
David Reiss [Mon, 4 Aug 2008 18:38:36 +0000 (18:38 +0000)] 
java: Specify in build.xml that we are using Java 1.5

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

16 years agorb: Check container elements when Thrift.type_checking = true [THRIFT-104]
Kevin Clark [Fri, 1 Aug 2008 22:04:09 +0000 (22:04 +0000)] 
rb: Check container elements when Thrift.type_checking = true [THRIFT-104]

Author: Kevin Ballard <kevin@rapleaf.com>

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

16 years agoTHRIFT-48. python: Make TServerSocket work with Unix-domain sockets
David Reiss [Thu, 31 Jul 2008 20:15:17 +0000 (20:15 +0000)] 
THRIFT-48. python: Make TServerSocket work with Unix-domain sockets

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

16 years agorb: Support `raise Xception, message` for Structs that inherit from ::Exception ...
Kevin Clark [Mon, 28 Jul 2008 22:20:36 +0000 (22:20 +0000)] 
rb: Support `raise Xception, message` for Structs that inherit from ::Exception [THRIFT-58]

Author: Kevin Ballard <kevin@rapleaf.com>

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

16 years agorb: Add ext/ to loadpath so BinaryProtocolAccelerated specs pass
Kevin Clark [Mon, 28 Jul 2008 22:16:34 +0000 (22:16 +0000)] 
rb: Add ext/ to loadpath so BinaryProtocolAccelerated specs pass

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

16 years agorb: Ensure the transport is closed if an exception is raised serializing data in...
Kevin Clark [Mon, 28 Jul 2008 22:16:28 +0000 (22:16 +0000)] 
rb: Ensure the transport is closed if an exception is raised serializing data in Client.send_message [THRIFT-75]

Author: Kevin Ballard <kevin@rapleaf.com>

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

16 years agoTHRIFT-99. php: Add scheme (http[s], etc.) support to THttpClient
David Reiss [Sun, 27 Jul 2008 23:41:13 +0000 (23:41 +0000)] 
THRIFT-99. php: Add scheme (http[s], etc.) support to THttpClient

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

16 years agorb: Teach BinaryProtocolAccelerated to encode strings with NULs [THRIFT-97]
David Reiss [Fri, 25 Jul 2008 21:06:06 +0000 (21:06 +0000)] 
rb: Teach BinaryProtocolAccelerated to encode strings with NULs [THRIFT-97]

This patch adds a spec and fixes the behavior to properly treat strings as binary
blobs of data instead of as C strings when writing to the transport.

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

16 years agorb: Spec out Thrift::BinaryProtocolAccelerated [THRIFT-90]
David Reiss [Fri, 25 Jul 2008 21:06:03 +0000 (21:06 +0000)] 
rb: Spec out Thrift::BinaryProtocolAccelerated [THRIFT-90]

Convert most of the BinaryProtocol spec into shared examples and
add specific specs for encode_binary/decode_binary.

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

16 years agorb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]
David Reiss [Fri, 25 Jul 2008 21:05:59 +0000 (21:05 +0000)] 
rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]

BinaryProtocolAccelerated references the deprecated name TProtocolException,
when it should be using Thrift::ProtocolException.
It also uses rb_raise() instead of rb_exc_raise().

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

16 years agoTHRIFT-91. cpp: Fix compilation on Fedora Core 9
David Reiss [Fri, 25 Jul 2008 19:48:39 +0000 (19:48 +0000)] 
THRIFT-91. cpp: Fix compilation on Fedora Core 9

It turns out that __STDC_LIMIT_MACROS is not portable.
Include limits.h at least until cstdint becomes mainstream.

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

16 years agoTHRIFT-64. java: Allow TServerSocket to bind to a specific IP address
David Reiss [Thu, 24 Jul 2008 19:20:32 +0000 (19:20 +0000)] 
THRIFT-64. java: Allow TServerSocket to bind to a specific IP address

Add a new constructor to TServerSocket that accepts an InetSocketAddress
and binds to that address.  Define the old constructor (which just takes
a port) in terms of the new one.

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

16 years agoTHRIFT-85. Include an example of an optional field in tutorial.thrift
David Reiss [Thu, 24 Jul 2008 19:13:54 +0000 (19:13 +0000)] 
THRIFT-85. Include an example of an optional field in tutorial.thrift

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

16 years agoTHRIFT-95. cpp: Fix write buffer initialization in TBufferedTransport
David Reiss [Thu, 24 Jul 2008 19:10:16 +0000 (19:10 +0000)] 
THRIFT-95. cpp: Fix write buffer initialization in TBufferedTransport

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

16 years agoTHRIFT-94. erlang: Fix a syntax error
David Reiss [Tue, 22 Jul 2008 06:57:41 +0000 (06:57 +0000)] 
THRIFT-94. erlang: Fix a syntax error

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

16 years agoTHRIFT-92. Remove the shebang line from reflection_limited.thrift
David Reiss [Mon, 21 Jul 2008 19:03:31 +0000 (19:03 +0000)] 
THRIFT-92. Remove the shebang line from reflection_limited.thrift

We have tentatively decided to nix the shebang notation for Thrift files.

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

16 years agoTHRIFT-93. Remove unnecessary shebang lines from Python libraries
David Reiss [Mon, 21 Jul 2008 19:03:11 +0000 (19:03 +0000)] 
THRIFT-93. Remove unnecessary shebang lines from Python libraries

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

16 years agorb: Improve IOStreamTransport to behave more like a real transport [THRIFT-76]
Kevin Clark [Fri, 18 Jul 2008 22:27:03 +0000 (22:27 +0000)] 
rb: Improve IOStreamTransport to behave more like a real transport [THRIFT-76]

Author: Kevin Ballard <kevin@rapleaf.com>

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