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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
David Reiss [Tue, 18 Mar 2008 18:22:26 +0000 (18:22 +0000)]
Initialize the binary_ field of t_base_type.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665574
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 18 Mar 2008 18:22:14 +0000 (18:22 +0000)]
Public access to the protocols in C# Thrift clients.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665573
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 18 Mar 2008 18:21:58 +0000 (18:21 +0000)]
Some optimizations to the C# generated code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665572
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 18 Mar 2008 18:21:52 +0000 (18:21 +0000)]
TSocketPool changes
Summary: 1] Added empty constructor
2] Added function to set server list
3] Made getServers return by ref
4] Made list of servers be a list of pointers
The last change is so that someone can pass in the list of servers and rely on TSocketPool to change the failure time directly on the TSocketServer object
Reviewed By: aditya
Test Plan: Ran with a test search server
Revert: OK
DiffCamp Revision: 9529
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665571
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 14 Mar 2008 00:51:42 +0000 (00:51 +0000)]
Don't allow async (no return) functions that throw exceptions.
This wouldn't work anyway. Better to catch it early.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665570
13f79535-47bb-0310-9956-
ffa450edef68
Christopher Piro [Wed, 12 Mar 2008 04:28:43 +0000 (04:28 +0000)]
[thrift] cleanup generated trailing whitespace in php
Summary: Verfolgenplaatze sind verboten!
Reviewed By: kder
Test Plan: no
Revert Plan: yes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665569
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 11 Mar 2008 21:41:47 +0000 (21:41 +0000)]
Add some generated files to .gitignore.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665568
13f79535-47bb-0310-9956-
ffa450edef68
dweatherford [Tue, 11 Mar 2008 02:42:45 +0000 (02:42 +0000)]
[thrift] Move readMessageEnd inside of else block for accelerated protocol
Summary: Otherwise, readMessageEnd will be performed twice; once in the extension and once in PHP-land. Since TBinaryProtocol readMessageEnd is a no-op this isn't a huge deal, but it's bad style.
Reviewed By: mcslee
Test Plan: Inspect generated php code
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 9155
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665567
13f79535-47bb-0310-9956-
ffa450edef68
dweatherford [Sat, 8 Mar 2008 05:51:24 +0000 (05:51 +0000)]
[thrift] php thrift_protocol crash fixes
Summary: The convert_to_*_ex functions were being used improperly resulting
in heap corruption in some cases; I just switched everything over to the
non-ex versions since it shouldn't matter if I modify the value being
serialized in place to coerce it to the proper type.
Also fixed a potential crash for map, set, and list types when not passed
an array, by first attempting an array conversion and then throwing a
tprotocolexception if that doesn't succeed. (Actually, PHP might fatal there
instead, it wasn't immediately clear from reading the code if that would
be the case).
Reviewed by: marcel
Test plan: Ran under php-5.2.5, debug and release builds. No more heap corruption
or memory leak complaints (the latter also a side effect of undesired zval
reference separation).
Revert: only if you love SIGSEGV
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665566
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 7 Mar 2008 20:28:31 +0000 (20:28 +0000)]
Add an accessor for the I/O protocols of Thrift clients.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665565
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 7 Mar 2008 20:12:28 +0000 (20:12 +0000)]
Remove some trailing whitespace.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665564
13f79535-47bb-0310-9956-
ffa450edef68