common/thrift.git
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

17 years agoInitialize the binary_ field of t_base_type.
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

17 years agoPublic access to the protocols in C# Thrift clients.
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

17 years agoSome optimizations to the C# generated code.
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

17 years agoTSocketPool changes
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

17 years agoDon't allow async (no return) functions that throw exceptions.
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

17 years ago[thrift] cleanup generated trailing whitespace in php
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

17 years agoAdd some generated files to .gitignore.
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

17 years ago[thrift] Move readMessageEnd inside of else block for accelerated protocol
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

17 years ago[thrift] php thrift_protocol crash fixes
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

17 years agoAdd an accessor for the I/O protocols of Thrift clients.
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

17 years agoRemove some trailing whitespace.
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

17 years agoAdd .gitignore file.
David Reiss [Fri, 7 Mar 2008 20:12:25 +0000 (20:12 +0000)] 
Add .gitignore file.

Ignore all generated files.

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

17 years agoAdd Java JSON protocol implementation.
David Reiss [Fri, 7 Mar 2008 20:12:20 +0000 (20:12 +0000)] 
Add Java JSON protocol implementation.

Implement full-featured JSON protocol, low-level base-64 encode/decode
methods, and related tests.

Conflicts (resolved by dreiss):

test/java/build.xml

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

17 years agoAdd Java memory buffer transport implementation.
David Reiss [Fri, 7 Mar 2008 20:12:17 +0000 (20:12 +0000)] 
Add Java memory buffer transport implementation.

Wraps a TByteArrayOutputStream.

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

17 years agoAdd NOT_IMPLEMENTED exception code.
David Reiss [Fri, 7 Mar 2008 20:12:13 +0000 (20:12 +0000)] 
Add NOT_IMPLEMENTED exception code.

Preparation for Java JSON protocol implementation.

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

17 years agoAdd more complete base64 testing for C++ JSON protocol.
David Reiss [Fri, 7 Mar 2008 20:12:07 +0000 (20:12 +0000)] 
Add more complete base64 testing for C++ JSON protocol.

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

17 years ago[thrift] ZTS fixes for thift_protocol extension
dweatherford [Thu, 6 Mar 2008 03:11:08 +0000 (03:11 +0000)] 
[thrift] ZTS fixes for thift_protocol extension

Summary: Now the threadsafe build compiles!
Reviewed by: mcslee
Test Plan: compiles, ship it
Revert: ok

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

17 years agorestore tags/1.0.0, we need these at least until fb9 is rolled everywhere
lucas [Wed, 5 Mar 2008 22:04:13 +0000 (22:04 +0000)] 
restore tags/1.0.0, we need these at least until fb9 is rolled everywhere

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

17 years agoTNonblockingServer: Fix wrong exception names
David Reiss [Wed, 5 Mar 2008 07:51:47 +0000 (07:51 +0000)] 
TNonblockingServer: Fix wrong exception names

Reviewed By: dreiss

Test Plan: trivial :)

Revert: OK

DiffCamp Revision: 8789

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

17 years agoThrift: Add writePtr(), wroteBytes() to TMemoryBuffer
David Reiss [Wed, 5 Mar 2008 07:51:44 +0000 (07:51 +0000)] 
Thrift: Add writePtr(), wroteBytes() to TMemoryBuffer

Summary: This adds the discussed interface to TMemoryBuffer, as follows:

         - writePtr(size) returns a ptr you can write (size) bytes to
         - wroteBytes() lets it know you wrote that many bytes

         To do this, I refactored an:
         - ensureCanWrite(size) private func

Reviewed By: dreiss

Test Plan: works in my test environment

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 8739

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

17 years agoThrift: concurrency/Util.h: Add converters for 'struct timeval', cleanup
David Reiss [Wed, 5 Mar 2008 07:51:40 +0000 (07:51 +0000)] 
Thrift: concurrency/Util.h: Add converters for 'struct timeval', cleanup

Summary: - Added 'struct timeval' toMilliseconds and toTimeval converters modeled on the timespec ones
         - Added constants for microsecs, and got rid of the 500000 and 500 magic #'s :)

Reviewed By: dreiss

Test Plan: works in my test env

Revert: OK

DiffCamp Revision: 8742

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

17 years agoChange the Java help to be a little more consistent.
David Reiss [Tue, 4 Mar 2008 21:10:41 +0000 (21:10 +0000)] 
Change the Java help to be a little more consistent.

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

17 years agoDon't declare getStaticLimitedReflection if gen_reflection_limited_ is off.
David Reiss [Tue, 4 Mar 2008 21:10:38 +0000 (21:10 +0000)] 
Don't declare getStaticLimitedReflection if gen_reflection_limited_ is off.

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

17 years agoChanged an awkward if/else if/else to be slightly less awkward.
David Reiss [Tue, 4 Mar 2008 21:10:34 +0000 (21:10 +0000)] 
Changed an awkward if/else if/else to be slightly less awkward.

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

17 years agoFix a typo in configure.ac.
David Reiss [Tue, 4 Mar 2008 21:10:29 +0000 (21:10 +0000)] 
Fix a typo in configure.ac.

Used "==" instead of "=" in a test.

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

17 years ago[thrift] Erlang build tweaks
Christopher Piro [Tue, 4 Mar 2008 07:09:12 +0000 (07:09 +0000)] 
[thrift] Erlang build tweaks

Summary: fix the Makefile to use BSD-friendly find(1) and enable conditional building of the Erlang binding.  Contributed by Dan Sully (daniel@electricrain.com).

Reviewed By: eletuchy

Test Plan: builds

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

17 years ago[thrift] PHP thrift_protocol extension, revision 2.0
dweatherford [Tue, 4 Mar 2008 01:08:23 +0000 (01:08 +0000)] 
[thrift] PHP thrift_protocol extension, revision 2.0

Summary:
  All PHP serialization and deserialization can now happen in extension-land,
  which should be much faster. This includes reading message headers and all
  complex types (structs, exceptions, whatever).

  The compiler has been updated to always emit the $_TSPEC static array for
  generated PHP code, since the new extension depends on it.

  As before, the PHP code gates enabling the accelerated serialization on
  the protocol being an instance of TBinaryProtocolAcclerated and the function
  for the [de]serialization operation existing.

  The function names have changed since the last version of the extension,
  so old and new generated code can coexist, and new generated code can run on
  a server with the old extension (but it will not use accelerated serialization).

Reviewed by: hzhao
Test Plan: Generated a couple of endpoints and called their services through the
  new extension. Both use a variety of nested complex types. Built and ran the
  extension in php-5.2.3 in debug mode, killed the reported memory leaks.

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

17 years agoFix a typo in a warning message in thrifty.yy.
David Reiss [Sun, 2 Mar 2008 21:59:48 +0000 (21:59 +0000)] 
Fix a typo in a warning message in thrifty.yy.

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

17 years agoAllow the C# library to be excluded from the build.
David Reiss [Sun, 2 Mar 2008 07:00:26 +0000 (07:00 +0000)] 
Allow the C# library to be excluded from the build.

Use AX_THRIFT_LIB to make configure support --without-csharp.
Don't bother testing for the C# requirements if this is set.

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

17 years agoAllow the Java library to be excluded from the build.
David Reiss [Sun, 2 Mar 2008 07:00:22 +0000 (07:00 +0000)] 
Allow the Java library to be excluded from the build.

Use AX_THRIFT_LIB to make configure support --without-java.
Don't bother testing for the Java requirements if this is set.

This is necessary because the autoconf macros we are using for Java
cause configure to quit with an error if Java is not found.

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

17 years agoInfrastructure for excluding language libraries from the build.
David Reiss [Sun, 2 Mar 2008 07:00:19 +0000 (07:00 +0000)] 
Infrastructure for excluding language libraries from the build.

Add a new autoconf macro (a thin wrapper around AC_ARG_WITH) that
makes it pretty easy to include or exclude specific language libraries.

This will be tested along with future changes that use it.

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

17 years agoMake the configure help more consistent.
David Reiss [Sun, 2 Mar 2008 07:00:15 +0000 (07:00 +0000)] 
Make the configure help more consistent.

Make the help strings generated by AX_THRIFT_GEN look more like
the ones from built-in autoconf macros.

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