Commit Graph

911 Commits

Author SHA1 Message Date
David Reiss
ae253583e7 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
2008-03-27 21:42:11 +00:00
David Reiss
6e93b454ec 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
2008-03-27 21:42:06 +00:00
David Reiss
a640cea9ae 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
2008-03-27 21:42:01 +00:00
David Reiss
c53b184c12 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
2008-03-27 21:41:58 +00:00
David Reiss
320e45ce8b 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
2008-03-27 21:41:54 +00:00
David Reiss
bfd26dcecc 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
2008-03-27 21:41:49 +00:00
David Reiss
0d6eb969e1 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
2008-03-27 21:41:45 +00:00
David Reiss
558e3993e1 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
2008-03-27 21:41:40 +00:00
David Reiss
9d65bf061f 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
2008-03-27 21:41:37 +00:00
David Reiss
ce4f4f0cbd 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
2008-03-27 21:41:31 +00:00
David Reiss
2dfdb2d7f7 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
2008-03-27 21:41:27 +00:00
David Reiss
861869b734 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
2008-03-27 21:41:23 +00:00
David Reiss
919ae80934 Fix a stale debug message.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665607 13f79535-47bb-0310-9956-ffa450edef68
2008-03-27 21:41:11 +00:00
David Reiss
54b602b746 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
2008-03-27 21:41:06 +00:00
David Reiss
4b349aabc9 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
2008-03-27 21:41:02 +00:00
David Reiss
e21ce4c6ca 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
2008-03-27 21:40:59 +00:00
David Reiss
d01c64dec5 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
2008-03-27 21:40:55 +00:00
David Reiss
be9757568f 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
2008-03-27 21:40:52 +00:00
David Reiss
3b45501b52 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
2008-03-27 21:40:46 +00:00
David Reiss
b3ac8a6c72 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
2008-03-27 21:40:42 +00:00
David Reiss
2b6ba090dc 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
2008-03-27 21:40:38 +00:00
David Reiss
a890b5714e 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
2008-03-27 21:40:35 +00:00
David Reiss
73dc1431d1 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
2008-03-27 21:40:30 +00:00
David Reiss
22812f8be8 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
2008-03-27 21:40:26 +00:00
David Reiss
42e6d51437 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
2008-03-27 21:40:20 +00:00
David Reiss
af3ab2619d 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
2008-03-27 21:40:16 +00:00
David Reiss
3d671b5e53 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
2008-03-27 21:40:11 +00:00
David Reiss
7bb71df6ef 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
2008-03-27 21:40:08 +00:00
David Reiss
f0521b1305 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
2008-03-27 21:40:05 +00:00
David Reiss
b4d7b89efd 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
2008-03-27 21:40:01 +00:00
David Reiss
237171ee81 Whitespace-only change for consistency.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665589 13f79535-47bb-0310-9956-ffa450edef68
2008-03-27 21:39:58 +00:00
David Reiss
d6609e2b62 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
2008-03-27 21:39:55 +00:00
David Reiss
f10984b589 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
2008-03-27 21:39:52 +00:00
David Reiss
c934268249 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
2008-03-27 21:39:49 +00:00
David Reiss
7502e0be13 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
2008-03-27 19:45:24 +00:00
David Reiss
4b83d6ddeb 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
2008-03-27 19:45:19 +00:00
David Reiss
2d2aa145b4 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
2008-03-26 07:22:26 +00:00
David Reiss
0c703cc2f8 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
2008-03-25 18:38:56 +00:00
dweatherford
0b8a382c00 [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
2008-03-25 03:15:10 +00:00
David Reiss
62f0d5428d 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
2008-03-21 21:50:41 +00:00
Christopher Piro
9cc63b53ef [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
2008-03-21 00:40:42 +00:00
Mark Slee
dcdf25b003 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
2008-03-19 20:16:35 +00:00
David Reiss
d92ca7dcea 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
2008-03-18 19:32:00 +00:00
David Reiss
fc78b23633 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
2008-03-18 18:22:52 +00:00
David Reiss
c9d06ee2dd Fixes for the C# library.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665575 13f79535-47bb-0310-9956-ffa450edef68
2008-03-18 18:22:43 +00:00
David Reiss
968bed847e 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
2008-03-18 18:22:26 +00:00
David Reiss
cdfbeb8d75 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
2008-03-18 18:22:14 +00:00
David Reiss
b79acc9f60 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
2008-03-18 18:21:58 +00:00
David Reiss
8f3bce4153 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
2008-03-18 18:21:52 +00:00
David Reiss
6d94390375 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
2008-03-14 00:51:42 +00:00