common/thrift.git
17 years agoEliminate an unused local variable.
David Reiss [Thu, 1 May 2008 05:52:49 +0000 (05:52 +0000)] 
Eliminate an unused local variable.

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

17 years agoRemove a few unnecessary includes to speed up compiles.
David Reiss [Thu, 1 May 2008 05:52:48 +0000 (05:52 +0000)] 
Remove a few unnecessary includes to speed up compiles.

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

17 years agoC++: Make write{Struct,Field}Begin take "name" as a const char*.
David Reiss [Tue, 29 Apr 2008 23:12:24 +0000 (23:12 +0000)] 
C++: Make write{Struct,Field}Begin take "name" as a const char*.

Summary:
These methods previously took name as a const string&.  While that way
is more idiomatic, it requires a temporary string to be constructed
when we pass a string literal (which is always).  This was significantly
slowing down the serialization of field-heavy structures.  This change
will break ABI compatibility, but the serialization speed boost with
no external API changes is too important to pass up.

Reviewed By: mcslee, aditya

Test Plan: make check

TracCamp Project: Thrift

Revert Plan: ok

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

17 years agoJava: In toString for generated structs, handle nulls.
David Reiss [Tue, 29 Apr 2008 23:09:11 +0000 (23:09 +0000)] 
Java: In toString for generated structs, handle nulls.

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

17 years agoThrift REST parsing allows null object params
David Reiss [Tue, 29 Apr 2008 00:29:45 +0000 (00:29 +0000)] 
Thrift REST parsing allows null object params

Summary: If JSON objects are passed in allow them to be null and don'\''t default construct.

Reviewed By: dreiss

Test Plan: Regenerate API code and test on object args.

Revert: OK

DiffCamp Revision: 12407

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

17 years agoTHRIFT: Nonblcoking bug fix
David Reiss [Tue, 29 Apr 2008 00:29:43 +0000 (00:29 +0000)] 
THRIFT: Nonblcoking bug fix

calling decrement with -1 even though param is an integer. Just made it clean by adding a decrement function

reviewed by: mcslee
revertable
test plan: ran on a test server

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

17 years agoPersistent conns in TSocketPool
David Reiss [Tue, 29 Apr 2008 00:29:41 +0000 (00:29 +0000)] 
Persistent conns in TSocketPool

Summary: Added support for persistent conns in TSocketPool
         Also, added some util functions in TNonblockingServer

Reviewed By: mcslee

Test Plan: Ran a test search cluster with these changes - open was only called once (I put fprintfs in open and close), after which the socket was reused

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 11425

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

17 years agoAdd a missing include to Benchmark.cpp to make it build on Mac OS.
David Reiss [Mon, 28 Apr 2008 02:51:44 +0000 (02:51 +0000)] 
Add a missing include to Benchmark.cpp to make it build on Mac OS.

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

17 years agoSilence a valgrind complaint by matching "delete[]" with "new[]".
David Reiss [Mon, 28 Apr 2008 02:42:28 +0000 (02:42 +0000)] 
Silence a valgrind complaint by matching "delete[]" with "new[]".

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

17 years agoVersion bump to 20080411.
David Reiss [Mon, 21 Apr 2008 18:08:07 +0000 (18:08 +0000)] 
Version bump to 20080411.

Also updated CONTRIBUTORS and NEWS.

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

17 years agoAdd build.xml, src, and LICENSE to EXTRA_DIST in lib/java/Makefile.am.
David Reiss [Mon, 21 Apr 2008 18:08:01 +0000 (18:08 +0000)] 
Add build.xml, src, and LICENSE to EXTRA_DIST in lib/java/Makefile.am.

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

17 years agoAdd TBase64Utils.h and TJSONProto.h to lib/cpp/Makefile.am.
David Reiss [Mon, 21 Apr 2008 18:07:58 +0000 (18:07 +0000)] 
Add TBase64Utils.h and TJSONProto.h to lib/cpp/Makefile.am.

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

17 years agoAdd contrib to EXTRA_DIST so it goes into make dist.
David Reiss [Mon, 21 Apr 2008 18:07:53 +0000 (18:07 +0000)] 
Add contrib to EXTRA_DIST so it goes into make dist.

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

17 years agoAdd a distdir rule to lib/erl/Makefile to make "make check" happy.
David Reiss [Mon, 21 Apr 2008 18:07:49 +0000 (18:07 +0000)] 
Add a distdir rule to lib/erl/Makefile to make "make check" happy.

This is a gross hack because lib/erl isn't using automake,
but it is still in SUBDIRs.

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

17 years agoCheck for ssize_t in configure.ac.
David Reiss [Mon, 21 Apr 2008 18:07:43 +0000 (18:07 +0000)] 
Check for ssize_t in configure.ac.

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

17 years agoDelete a crazy line from fb303's build.xml.
David Reiss [Sun, 20 Apr 2008 05:28:14 +0000 (05:28 +0000)] 
Delete a crazy line from fb303's build.xml.

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

17 years agoThrift: bug fix for interrupting server socket
David Reiss [Fri, 18 Apr 2008 17:48:03 +0000 (17:48 +0000)] 
Thrift: bug fix for interrupting server socket

Summary: TServerSocket uses a socket pair to signal interruption to the select() call on its main server socket.  A bug in the code prevented the select() from listening for events on the internal socket pair; in fact, it was accidentally listening to file descriptor 1.

Reviewed By: aditya

Test Plan: Use a server that supports a call to shutdown, which should signal an interrupt to the internal socket, and should result in an immediate and clean termination of the server socket thread.

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 11932

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

17 years agoAdd a few missing includes.
David Reiss [Tue, 15 Apr 2008 05:44:00 +0000 (05:44 +0000)] 
Add a few missing includes.

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

17 years agoFix Thrift.cpp for non-Linux systems.
David Reiss [Fri, 11 Apr 2008 22:36:31 +0000 (22:36 +0000)] 
Fix Thrift.cpp for non-Linux systems.

- Add some missing namespace qualifiers that are not used in the glibc case.
- Move an include from Thrift.h to Thrift.cpp.
- Include boost/lexical_cast.hpp in TJSONProtocol, in case we ever eliminate
  it from our header files.

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

17 years agoAdd simple "check" and "distclean" targets to lib/erl/Makefile.
David Reiss [Fri, 11 Apr 2008 22:00:06 +0000 (22:00 +0000)] 
Add simple "check" and "distclean" targets to lib/erl/Makefile.

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

17 years agoRemove some .pyc files from fb303.
David Reiss [Fri, 11 Apr 2008 22:00:00 +0000 (22:00 +0000)] 
Remove some .pyc files from fb303.

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

17 years agoWhitespace change for consistency.
David Reiss [Fri, 11 Apr 2008 21:59:45 +0000 (21:59 +0000)] 
Whitespace change for consistency.

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

17 years ago[thrift] Propogate exceptions from transports in thrift_protocol extension
dweatherford [Fri, 11 Apr 2008 02:51:44 +0000 (02:51 +0000)] 
[thrift] Propogate exceptions from transports in thrift_protocol extension

Summary: Otherwise, it will spin forever if your socket connection gets dropped
  or otherwise times out.
Reviewed by: dbraginsky
Test plan: Modified TSocket to always throw an exception on read() and tried
  some service calls
Revert: svn

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

17 years agoocaml and haskell thrift clients now calling readMessageEnd
iproctor [Thu, 10 Apr 2008 00:31:55 +0000 (00:31 +0000)] 
ocaml and haskell thrift clients now calling readMessageEnd

Summary: I neglected to make the call to readMessageEnd if the client read an app exception in the haskell and ocaml code. Fixed now. The test cases for both now also compile with the new ThriftTest.thrift (though haskell's is still not doing anything but echoing  the args)

Reviewed By: dreiss

Test Plan: Ran test code. This bug would actually never show up because there's only tbinaryprotocol implemented for these languages and that does nothing on a readMessageEnd.

Revert: OK

DiffCamp Revision: 11377

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

17 years agoFix a minor bug in TDebugProtocol and remove dead code.
David Reiss [Tue, 8 Apr 2008 19:38:49 +0000 (19:38 +0000)] 
Fix a minor bug in TDebugProtocol and remove dead code.

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

17 years agoUse poll instead of select in TServerSocket
David Reiss [Tue, 8 Apr 2008 06:26:27 +0000 (06:26 +0000)] 
Use poll instead of select in TServerSocket

Summary: - select has a restricted max fd set size. While this should not be an issue in the normal case for
           TServerSocket because it is started when the process starts, it could be a problem if someone wanted
           to start a new server socket at a later point in time when socket values could be greater than max.

Reviewed By: dreiss

Test Plan: - Compiled.
           - Deployed search tier and made sure it could serve queries.

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 11076

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

17 years agoThrift error logging improvements
David Reiss [Tue, 8 Apr 2008 06:26:05 +0000 (06:26 +0000)] 
Thrift error logging improvements

Summary: - Move strerror_s to Thrift.h (was previously in TTransportException.h)
         - Capture errno as soon as syscall returns failure and make it part of error message.
         - Cleaned up several instances of the wrong error value being printed.
         - More consistently pass the errno in the TTransport Exception
         - Add more consistent error logging for the various transport failure modes

Reviewed By: dreiss

Test Plan: - compile everything.
           - test on search tier

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 11077

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

17 years agouse poll instead of select in TSocket
David Reiss [Tue, 8 Apr 2008 06:25:45 +0000 (06:25 +0000)] 
use poll instead of select in TSocket

Summary: fd_set, which we pass into select only supports  fds with values < 1024.
         fds can be >= 1024.
         this can cause memory corruption

         learning this stuff over 2 weeks of examining crazy core dumps is way more fun that reading it up somewhere.

         poll takes an array of fds insetad, so your fd can be any int

Reviewed By: dreiss

Test Plan: ran inside a test search cluster

Revert: OK

DiffCamp Revision: 10731

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

17 years agoFix a bug in TPipedTransport that broke pipelining.
David Reiss [Tue, 8 Apr 2008 05:07:26 +0000 (05:07 +0000)] 
Fix a bug in TPipedTransport that broke pipelining.

Previously, TPipedTransport wrote it's full buffer to the "pipe" and
fully reset its buffer on a readEnd.  This assumed that the buffer was
fully read at that point.  This is not the case if requests are pipelined.
This change makes it only pipe out the portion that has been read and
copy the unread portion to the beginning of the buffer.

Also add a test that verifies the new functionality.

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

17 years agoAdd thrift_dump.cpp to contrib.
David Reiss [Tue, 8 Apr 2008 05:07:14 +0000 (05:07 +0000)] 
Add thrift_dump.cpp to contrib.

thrift_dump is a simple program for converting data from TBinaryProtocol to
TDebugProtocol.  Throw it in contrib because it is pretty primitve.

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

17 years agoAdd TFDTransport: a dead-simple wrapper around a file-descriptor.
David Reiss [Tue, 8 Apr 2008 05:06:59 +0000 (05:06 +0000)] 
Add TFDTransport: a dead-simple wrapper around a file-descriptor.

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

17 years agoAdd TProtocolTap: a meta-protocol for "wiretapping".
David Reiss [Tue, 8 Apr 2008 05:06:45 +0000 (05:06 +0000)] 
Add TProtocolTap: a meta-protocol for "wiretapping".

TProtocolTap is a protocol that passes reads through to a "source" protocol,
but mirrors them as writes to a "sink" protocol.

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

17 years agoTDebugProtocol: Add support for messages.
David Reiss [Tue, 8 Apr 2008 05:06:32 +0000 (05:06 +0000)] 
TDebugProtocol: Add support for messages.

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

17 years agoTDebugProtocol: Support a limit on string length.
David Reiss [Tue, 8 Apr 2008 05:06:15 +0000 (05:06 +0000)] 
TDebugProtocol: Support a limit on string length.

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

17 years agoClean up the unit tests.
David Reiss [Mon, 7 Apr 2008 23:45:00 +0000 (23:45 +0000)] 
Clean up the unit tests.

- Make Python tests cwd-agnostic.
- Use boost::test.
- Add a benchmark.
- Use a library to clean up test/Makefile.am.

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

17 years agoFix some indentation.
David Reiss [Thu, 3 Apr 2008 23:16:46 +0000 (23:16 +0000)] 
Fix some indentation.

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

17 years agoRemove sigplanconf.cls and thrift.pdf.
David Reiss [Thu, 3 Apr 2008 20:16:53 +0000 (20:16 +0000)] 
Remove sigplanconf.cls and thrift.pdf.

The license for the cls file is unclear, and the formatted pdf file is
a derivative work.  Therefore, it is probably not safe for us to leave
these in the source tree once we go into Apache.

Also put a reference to the source of the cls file in thrift.tex.

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

17 years agoUpdate OCamlMakefile to the latest version and include its README.
David Reiss [Thu, 3 Apr 2008 20:16:45 +0000 (20:16 +0000)] 
Update OCamlMakefile to the latest version and include its README.

Updating isn't really necessary, I just wanted to be 100% that I had
the right version of the README for the version of the Makefile we had.
The main reason for including the README is to make the license clear.

Reviewed By: iproctor

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

17 years agoSquelch most Java 1.6 warnings.
David Reiss [Thu, 3 Apr 2008 20:16:28 +0000 (20:16 +0000)] 
Squelch most Java 1.6 warnings.

I actualy wasn't able to test this with Java 1.5.
Hopefully it doesn't break anything.

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

17 years agoMoved the java libraries from src to src/com/facebook/thrift.
David Reiss [Thu, 3 Apr 2008 20:16:10 +0000 (20:16 +0000)] 
Moved the java libraries from src to src/com/facebook/thrift.

Apparently this is what all the Java kids are doing these days.
Ran ant in lib/java and it built fine.

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

17 years agoadd fb303 to thrift contrib
pwyckoff [Thu, 3 Apr 2008 19:30:55 +0000 (19:30 +0000)] 
add fb303 to thrift contrib

Summary: Add clean version of fb303 to thrift contrib readying for open sourcing scribe

Reviewed By: dreiss

Test Plan: bootstrap.sh, make, make install on a fresh machine and then try compiling and running scribe open source version.

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 10841

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

17 years agoAdd a test client and server for C#.
David Reiss [Wed, 2 Apr 2008 22:10:17 +0000 (22:10 +0000)] 
Add a test client and server for C#.

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

17 years agoC#: Generate proper code for services that inherit from other services.
David Reiss [Wed, 2 Apr 2008 22:10:13 +0000 (22:10 +0000)] 
C#: Generate proper code for services that inherit from other services.

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

17 years agoC#: Catch exceptions by name.
David Reiss [Wed, 2 Apr 2008 22:10:09 +0000 (22:10 +0000)] 
C#: Catch exceptions by name.

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

17 years agoC#: Make TSimpleServer a public class.
David Reiss [Wed, 2 Apr 2008 22:10:06 +0000 (22:10 +0000)] 
C#: Make TSimpleServer a public class.

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

17 years agoC#: Fix a bug in the TApplicationException reader.
David Reiss [Wed, 2 Apr 2008 22:09:43 +0000 (22:09 +0000)] 
C#: Fix a bug in the TApplicationException reader.

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

17 years agoC# Makefile: New versions of Mono don't require -langversion:linq.
David Reiss [Wed, 2 Apr 2008 22:09:03 +0000 (22:09 +0000)] 
C# Makefile: New versions of Mono don't require -langversion:linq.

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

17 years agoFix a segfault in the compiler.
David Reiss [Wed, 2 Apr 2008 00:23:31 +0000 (00:23 +0000)] 
Fix a segfault in the compiler.

We weren't initializing our pointers properly, resulting in
a difficult-to-trigger segfault.

Reviewed By: mcslee, bhamadani

Test Plan: Built the modified search IDL.

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

17 years agoFix a memory leak in TBinaryProtocol.
David Reiss [Tue, 1 Apr 2008 04:17:58 +0000 (04:17 +0000)] 
Fix a memory leak in TBinaryProtocol.

Summary:
realloc doesn't free the original pointer when it returns null.

Reviewed By: cpiro

Test Plan: make check

TracCamp Project: Thrift

Revert Plan: ok

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

17 years agoAdd an experiment to measure the likeliness that realloc will avoid a copy.
David Reiss [Mon, 31 Mar 2008 21:38:29 +0000 (21:38 +0000)] 
Add an experiment to measure the likeliness that realloc will avoid a copy.

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

17 years agoMake the Perl generator use non-hardcoded namespaces.
David Reiss [Thu, 27 Mar 2008 21:42:39 +0000 (21:42 +0000)] 
Make the Perl generator use non-hardcoded namespaces.

- Make the Perl generator use program->get_namespace("perl")
  instead of program->get_perl_package()
- Eliminate the explicit "perl_package" in t_program.
- Deprecate the perl_package token.
- Update example .thrift files and syntax files.

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

17 years agoAllow the Thrift compiler to be built without the Perl generator.
David Reiss [Thu, 27 Mar 2008 21:42:34 +0000 (21:42 +0000)] 
Allow the Thrift compiler to be built without the Perl generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-perl
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_perl_generator.h.
David Reiss [Thu, 27 Mar 2008 21:42:30 +0000 (21:42 +0000)] 
Remove t_perl_generator.h.

t_perl_generator.h is no longer included anywhere, because
the Perl generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the Perl generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:42:23 +0000 (21:42 +0000)] 
Make the Perl generator dynamic.

- Modify the Perl generator constructor to fit the new generic interface.
- Register the Perl genrator with the central registry.
- Deprecate the old way of invoking the Perl generator.
- main.cc no longer includes t_pl_generator.h.

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

17 years agoMake the Ruby generator use non-hardcoded namespaces.
David Reiss [Thu, 27 Mar 2008 21:42:16 +0000 (21:42 +0000)] 
Make the Ruby generator use non-hardcoded namespaces.

- Make the Ruby generator use program->get_namespace("ruby")
  instead of program->get_ruby_namespace()
- Eliminate the explicit "ruby_namespace" in t_program.
- Deprecate the ruby_namespace token.
- Update example .thrift files and syntax files.

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

17 years agoAllow the Thrift compiler to be built without the Ruby generator.
David Reiss [Thu, 27 Mar 2008 21:42:11 +0000 (21:42 +0000)] 
Allow the Thrift compiler to be built without the Ruby generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-ruby
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_rb_generator.h.
David Reiss [Thu, 27 Mar 2008 21:42:06 +0000 (21:42 +0000)] 
Remove t_rb_generator.h.

t_rb_generator.h is no longer included anywhere, because
the Ruby generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the Ruby generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:42:01 +0000 (21:42 +0000)] 
Make the Ruby generator dynamic.

- Modify the Ruby generator constructor to fit the new generic interface.
- Register the Ruby genrator with the central registry.
- Deprecate the old way of invoking the Ruby generator.
- main.cc no longer includes t_rb_generator.h.

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

17 years agoRemove an unused helper function in the Ruby generator.
David Reiss [Thu, 27 Mar 2008 21:41:58 +0000 (21:41 +0000)] 
Remove an unused helper function in the Ruby generator.

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

17 years agoMake the Python generator use non-hardcoded namespaces.
David Reiss [Thu, 27 Mar 2008 21:41:54 +0000 (21:41 +0000)] 
Make the Python generator use non-hardcoded namespaces.

- Make the Python generator use program->get_namespace("py")
  instead of program->get_py_module()
- Eliminate the explicit "py_module" in t_program.
- Deprecate the py_module token.
- Update example .thrift files and syntax files.

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

17 years agoAllow the Thrift compiler to be built without the Python generator.
David Reiss [Thu, 27 Mar 2008 21:41:49 +0000 (21:41 +0000)] 
Allow the Thrift compiler to be built without the Python generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-py
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_py_generator.h.
David Reiss [Thu, 27 Mar 2008 21:41:45 +0000 (21:41 +0000)] 
Remove t_py_generator.h.

t_py_generator.h is no longer included anywhere, because
the Python generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the Python generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:41:40 +0000 (21:41 +0000)] 
Make the Python generator dynamic.

- Modify the Python generator constructor to fit the new generic interface.
- Register the Python genrator with the central registry.
- Deprecate the old way of invoking the Python generator.
- main.cc no longer includes t_py_generator.h.

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

17 years agoMake the C# generator use non-hardcoded namespaces.
David Reiss [Thu, 27 Mar 2008 21:41:37 +0000 (21:41 +0000)] 
Make the C# generator use non-hardcoded namespaces.

- Make the C# generator use program->get_namespace("csharp")
  instead of program->get_csharp_namespace()
- Eliminate the explicit "csharp_namespace" in t_program.
- Deprecate the csharp_namespace token.
- Update example .thrift files and syntax files.

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

17 years agoAllow the Thrift compiler to be built without the C# generator.
David Reiss [Thu, 27 Mar 2008 21:41:31 +0000 (21:41 +0000)] 
Allow the Thrift compiler to be built without the C# generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-csharp
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_csharp_generator.h.
David Reiss [Thu, 27 Mar 2008 21:41:27 +0000 (21:41 +0000)] 
Remove t_csharp_generator.h.

t_csharp_generator.h is no longer included anywhere, because
the C# generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

Also cleaned up its includes a little bit.

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

17 years agoMake the C# generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:41:23 +0000 (21:41 +0000)] 
Make the C# generator dynamic.

- Modify the C# generator constructor to fit the new generic interface.
- Register the C# genrator with the central registry.
- Deprecate the old way of invoking the C# generator.
- main.cc no longer includes t_csharp_generator.h.

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

17 years agoFix a stale debug message.
David Reiss [Thu, 27 Mar 2008 21:41:11 +0000 (21:41 +0000)] 
Fix a stale debug message.

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

17 years agoMake the Cocoa generator use non-hardcoded namespaces.
David Reiss [Thu, 27 Mar 2008 21:41:06 +0000 (21:41 +0000)] 
Make the Cocoa generator use non-hardcoded namespaces.

- Make the Cocoa generator use program->get_namespace("cocoa")
  instead of program->get_cocoa_prefix()
- Eliminate the explicit "cocoa_prefix" in t_program.
- Deprecate the cocoa_prefix token.
- Update example .thrift files and syntax files.

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

17 years agoAllow the Thrift compiler to be built without the Cocoa generator.
David Reiss [Thu, 27 Mar 2008 21:41:02 +0000 (21:41 +0000)] 
Allow the Thrift compiler to be built without the Cocoa generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-cocoa
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_cocoa_generator.h.
David Reiss [Thu, 27 Mar 2008 21:40:59 +0000 (21:40 +0000)] 
Remove t_cocoa_generator.h.

t_cocoa_generator.h is no longer included anywhere, because
the Cocoa generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the Cocoa generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:40:55 +0000 (21:40 +0000)] 
Make the Cocoa generator dynamic.

- Modify the Cocoa generator constructor to fit the new generic interface.
- Register the Cocoa genrator with the central registry.
- Deprecate the old way of invoking the Cocoa generator.
- main.cc no longer includes t_cocoa_generator.h.

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

17 years agoPut a newline at the end of the generated header file in the Cocoa generator.
David Reiss [Thu, 27 Mar 2008 21:40:52 +0000 (21:40 +0000)] 
Put a newline at the end of the generated header file in the Cocoa generator.

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

17 years agoMake the Smalltalk generator use non-hardcoded namespaces.
David Reiss [Thu, 27 Mar 2008 21:40:46 +0000 (21:40 +0000)] 
Make the Smalltalk generator use non-hardcoded namespaces.

- Make the Smalltalk generator use program->get_namespace("smalltalk.*")
  instead of program->get_smalltalk_{category|prefix}()
- Eliminate the explicit "smalltalk_{category|prefix}" in t_program.
- Deprecate the smalltalk_{category|prefix} tokens.
- Update example .thrift files and syntax files.

This was a little more complex than the others.  We now convert "." to "-"
in Smalltalk categories, because we no longer lex them as tok_st_identifier.

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

17 years agoAllow the Thrift compiler to be built without the Smalltalk generator.
David Reiss [Thu, 27 Mar 2008 21:40:42 +0000 (21:40 +0000)] 
Allow the Thrift compiler to be built without the Smalltalk generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-st
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_st_generator.h.
David Reiss [Thu, 27 Mar 2008 21:40:38 +0000 (21:40 +0000)] 
Remove t_st_generator.h.

t_st_generator.h is no longer included anywhere, because
the Smalltalk generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the Smalltalk generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:40:35 +0000 (21:40 +0000)] 
Make the Smalltalk generator dynamic.

- Modify the Smalltalk generator constructor to fit the new generic interface.
- Register the Smalltalk genrator with the central registry.
- Deprecate the old way of invoking the Smalltalk generator.
- main.cc no longer includes t_st_generator.h.

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

17 years agoMake the Smalltalk generator respect the "-o" flag.
David Reiss [Thu, 27 Mar 2008 21:40:30 +0000 (21:40 +0000)] 
Make the Smalltalk generator respect the "-o" flag.

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

17 years agoAllow the Thrift compiler to be built without the Haskell generator.
David Reiss [Thu, 27 Mar 2008 21:40:26 +0000 (21:40 +0000)] 
Allow the Thrift compiler to be built without the Haskell generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-hs
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_hs_generator.h.
David Reiss [Thu, 27 Mar 2008 21:40:20 +0000 (21:40 +0000)] 
Remove t_hs_generator.h.

t_hs_generator.h is no longer included anywhere, because
the Haskell generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the Haskell generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:40:16 +0000 (21:40 +0000)] 
Make the Haskell generator dynamic.

- Modify the Haskell generator constructor to fit the new generic interface.
- Register the Haskell genrator with the central registry.
- Deprecate the old way of invoking the Haskell generator.
- main.cc no longer includes t_hs_generator.h.

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

17 years agoAllow the Thrift compiler to be built without the OCaml generator.
David Reiss [Thu, 27 Mar 2008 21:40:11 +0000 (21:40 +0000)] 
Allow the Thrift compiler to be built without the OCaml generator.

- Use AX_THRIFT_GEN to make configure support --disable-gen-ocaml
- Update the compiler Makefile.am to exclude the generator.

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

17 years agoRemove t_ocaml_generator.h.
David Reiss [Thu, 27 Mar 2008 21:40:08 +0000 (21:40 +0000)] 
Remove t_ocaml_generator.h.

t_ocaml_generator.h is no longer included anywhere, because
the Ocaml generator uses the new dynamic generator framework.
Therefore, we can collapse the class definition into the .cc file.

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

17 years agoMake the OCaml generator dynamic.
David Reiss [Thu, 27 Mar 2008 21:40:05 +0000 (21:40 +0000)] 
Make the OCaml generator dynamic.

- Modify the OCaml generator constructor to fit the new generic interface.
- Register the OCaml genrator with the central registry.
- Deprecate the old way of invoking the OCaml generator.
- main.cc no longer includes t_ocaml_generator.h.

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

17 years agoMake generate_program virtual.
David Reiss [Thu, 27 Mar 2008 21:40:01 +0000 (21:40 +0000)] 
Make generate_program virtual.

Haskell and OCaml need to override this to put typedefs at the end.

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

17 years agoWhitespace-only change for consistency.
David Reiss [Thu, 27 Mar 2008 21:39:58 +0000 (21:39 +0000)] 
Whitespace-only change for consistency.

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

17 years agoMake cleanup.sh work a little better.
David Reiss [Thu, 27 Mar 2008 21:39:55 +0000 (21:39 +0000)] 
Make cleanup.sh work a little better.

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

17 years agoInclude <cassert> in main.cc.
David Reiss [Thu, 27 Mar 2008 21:39:52 +0000 (21:39 +0000)] 
Include <cassert> in main.cc.

We are doing an assert in main, but the assert header is being pulled in
by an include that is about to go.  Make it explicit.

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

17 years agoDelete code generators after using them.
David Reiss [Thu, 27 Mar 2008 21:39:49 +0000 (21:39 +0000)] 
Delete code generators after using them.

This has been leaking memory in the compiler, but it has also been
preventing the dynamic generators destructors from being called.
This can prevent a stream from being flushed properly.

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

17 years agoFix a bug with Perl's TSocket and THttpClient.
David Reiss [Thu, 27 Mar 2008 19:45:24 +0000 (19:45 +0000)] 
Fix a bug with Perl's TSocket and THttpClient.

The underlying Perl library expects timeouts in seconds, but the
documentation for the Thrift classes says the should be in milliseconds.
This changes divides timeouts by 1000 to make that the case.

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

17 years agoAllow nested namespaces to be used in perl.
David Reiss [Thu, 27 Mar 2008 19:45:19 +0000 (19:45 +0000)] 
Allow nested namespaces to be used in perl.

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

17 years agoUpdate to the latest version of AX_BOOST_BASE.
David Reiss [Wed, 26 Mar 2008 07:22:26 +0000 (07:22 +0000)] 
Update to the latest version of AX_BOOST_BASE.

It now has the license right in the file.

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

17 years agoFix some small bugs in the Perl generator.
David Reiss [Tue, 25 Mar 2008 18:38:56 +0000 (18:38 +0000)] 
Fix some small bugs in the Perl generator.

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

17 years ago[thrift] Error checking for T_OBJECT serialization
dweatherford [Tue, 25 Mar 2008 03:15:10 +0000 (03:15 +0000)] 
[thrift] Error checking for T_OBJECT serialization

Summary: Avoid segfaulting via calling zend_fetch_class_entry on something
  that might not actually be an object; throw an exception instead.
Reviewed by: shire

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

17 years agoRemove an unnecessary "else" from the generated Thrift code.
David Reiss [Fri, 21 Mar 2008 21:50:41 +0000 (21:50 +0000)] 
Remove an unnecessary "else" from the generated Thrift code.

The "if" block here always results in a return (or an exception),
so there is no need for an "else".  We can just put the rest of the code
under the "if" block.  This actually makes a little more sense because
the "if" block here is an exceptional case.

Also deleted a stale comment.

Reviewed By: lhastings

Test Plan: diff'ed the old and new code.

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

17 years ago[thrift] add setTcp{Send,Recv}Buffer to C++ TSocketServer
Christopher Piro [Fri, 21 Mar 2008 00:40:42 +0000 (00:40 +0000)] 
[thrift] add setTcp{Send,Recv}Buffer to C++ TSocketServer

Summary: needs moar BDPs

Reviewed By: mcslee

Test Plan: now using in our service

Revert Plan: ok

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

17 years agoFix compiler __construct gen in php
Mark Slee [Wed, 19 Mar 2008 20:16:35 +0000 (20:16 +0000)] 
Fix compiler __construct gen in php

Reviewed By: dreiss

Test Plan: Build payments

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

17 years agoPrevent Java's TProtocolUtil.skip from overflowing the stack.
David Reiss [Tue, 18 Mar 2008 19:32:00 +0000 (19:32 +0000)] 
Prevent Java's TProtocolUtil.skip from overflowing the stack.

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

17 years agoMake the C# build task more robust.
David Reiss [Tue, 18 Mar 2008 18:22:52 +0000 (18:22 +0000)] 
Make the C# build task more robust.

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

17 years agoFixes for the C# library.
David Reiss [Tue, 18 Mar 2008 18:22:43 +0000 (18:22 +0000)] 
Fixes for the C# library.

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