David Reiss [Sun, 2 Mar 2008 06:29:23 +0000 (06:29 +0000)]
Generate quality overrides of hashCode for Thrift structs (in Java).
This feature is turned off by default because it adds a new dependency:
Apache Commons Lang. This package seems enough like Boost that
I would be open to turning this feature on by default.
Also updated test/java/build.xml to use this new option.
ant test still passes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665542
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 2 Mar 2008 06:29:19 +0000 (06:29 +0000)]
Add support for .equals() to Java structs.
- Add a new method to t_java_generator that generates a .equals() method.
- Add a correct but useless implementation of hashCode for structs.
(This is required by conventino when overriding .equals().)
- Add java_package to DebugProtoTest and OptionalRequiredTest.
- Add a new structure to OptionalRequiredTest to assist testing the behavior
of .equals() with respect to null and unset fields.
- Clean up test/java/build.xml a bit. (It still has a ways to go.)
- Add EqualityTest.java to test .equals().
- Add IdentityTest.java to test that writing and reading a structure
preserves equality.
Tested by runnint atn test.
I also looked at the generated code for OptionalRequiredTest.thrift.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665541
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 2 Mar 2008 06:29:16 +0000 (06:29 +0000)]
Add a TDeserializer for Java.
The class is the reverse of TSerializer.
It allows you to deserialize a Thrift struct from a byte array (or String).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665540
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 2 Mar 2008 06:29:12 +0000 (06:29 +0000)]
Fix a comment in the Java TSerializer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665539
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 2 Mar 2008 00:58:04 +0000 (00:58 +0000)]
Add Stop methods for C# servers.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665538
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 2 Mar 2008 00:25:58 +0000 (00:25 +0000)]
Adding a few integration points to the C++ TSocketPool.
- Adding ability to use a vector of TSocketPoolServers to construct a TSocketPool
- Ability to get back the list of TSocketPoolServers
This is especially useful in multithreaded client code that
will just keep around the list of servers, and create the pool
on every request. Since TSocketPool updates the failure stuff,
we need a way to get back the updated TSocketPoolServers
Reviewed By: aditya
Test Plan: just compiling the code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665537
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 2 Mar 2008 00:20:47 +0000 (00:20 +0000)]
Fix potential out of bounds read issue with getTypeIDForTypeName().
Make sure type name is at least 2 characters long.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665536
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 29 Feb 2008 07:33:47 +0000 (07:33 +0000)]
Bug fix for C++ TSocketPool
Wasn't setting the host or port for each server in the pool on open.
Reviewed By: dbraginsky
Test Plan: Just compiled. Will test with dbraginsky's server.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665535
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 28 Feb 2008 21:20:12 +0000 (21:20 +0000)]
Fail and retry logic for TSocketPool
Summary: Replicating php logic: If opening fails enough times, mark server as down for some amount of time
Reviewed By: aditya
Test Plan: compiling thrift - any good test ideas?
Revert: OK
DiffCamp Revision: 8381
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665534
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 28 Feb 2008 21:11:39 +0000 (21:11 +0000)]
Fix for JSON Protocol string-reading methods.
Clear return-by-reference strings before appending to them
in the JSON Protocol reading methods.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665533
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 28 Feb 2008 21:11:34 +0000 (21:11 +0000)]
Fix for Base64 decoding.
Previously, the Base64 decoding table only covered ASCII characters,
but the decoding function looked up any character in the table.
This change extends the table.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665532
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 23:50:21 +0000 (23:50 +0000)]
[thrift] erlang: fixing error logger for devious "not-quite-right" lists
Summary: ... a la dictionary
Reviewed By: cpiro
Test Plan: bin_trim of a dict with a stored integer value
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665531
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 22:28:12 +0000 (22:28 +0000)]
Fix a subtle bug in cpp_use_include_path.
Summary:
I thought I had eliminated all the places where work was only done
if cpp_use_include_path was set. I guess I missed one.
Reviewed By: mcslee, mrabkin, kholst
Test Plan:
Built BigGrep and looked at the generated code.
Revert Plan: ok
DiffCamp Revision: 8375
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665530
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 19:56:52 +0000 (19:56 +0000)]
[thrift] erlang: dialyzer bug: binary protocol double type ...
Summary: ... needs to be specified as a float to work, since
erlang's binary syntax default is "integer"
Reviewed By: cpiro
Test Plan: make dialyzer -j
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665529
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 19:55:15 +0000 (19:55 +0000)]
[thrift] erlang: dialyzer bug: bad usage of ++ operator on a non-list
Reviewed By: cpiro
Test Plan: make dialyzer -j
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665528
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 19:38:51 +0000 (19:38 +0000)]
Add an operator< for Thrift structs (in C++).
Some people want to use sets of Thrift structs. This has interesting
implications, but it is a reasonable request. However, in C++,
this requires structures to have a less-than operator.
It seems a little dangerous to auto-generate an arbitrary comparator,
but allowing users to define their own operator< implementations
seems fine. This change makes that a lot easier.
The one downside of this change is that developers who try to compare
structures with operator< (including trying to make sets of them)
will now get a linker error instead of a compiler error.
However, the old compiler error was so scary that
I'm not sure this is any worse.
Reviewed By: kholst, mcslee
Test Plan: make check
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665527
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 19:27:41 +0000 (19:27 +0000)]
[thrift] erlang: dialyzer bug: tSocket reading of send_timeout preference
Reviewed By: cpiro
Test Plan: make dialyzer
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665526
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 18:38:42 +0000 (18:38 +0000)]
[thrift] erlang dialyzer error
Summary: impossible pattern matches are never good
Reviewed By: cpiro
Test Plan: make dialyzer
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665525
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 17:43:40 +0000 (17:43 +0000)]
[thrift] make erlang error logger more efficient
Summary: when omit_fmt is included
Reviewed By: cpiro
Test Plan: sanity checked a service to make sure it ran
Revert Plan: sure
Other Notes: TODO - make reconfiguration work with this
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665524
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 17:41:05 +0000 (17:41 +0000)]
[thrift] adding dialyzer to erlang library Makefile
Summary: ... because static analysis can find bugs
Reviewed By: cpiro
Test Plan: cd src ; make dialyzer -j
gape in awe at errors
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665523
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 27 Feb 2008 16:31:01 +0000 (16:31 +0000)]
[thrift] making erlang thrift error logger slightly nicer for printing binaries
Reviewed By: cpiro
Test Plan: ran some services ... verified that they worked
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665522
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 07:45:10 +0000 (07:45 +0000)]
Fix a warning message.
Forgot to update this when copy-pasting.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665521
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 07:45:05 +0000 (07:45 +0000)]
Make limited reflection optional (off by default).
Limited reflection is deprecated, and it is slowing down compilation.
This change will disable generation of static reflection by default,
but it adds a command line argument to re-enable it.
Tested by running make check and building the C++ test client and server.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665520
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 07:45:00 +0000 (07:45 +0000)]
Update test/Makefile.am to use the new compiler command-line format.
Tested by running make check.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665519
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Wed, 27 Feb 2008 04:29:34 +0000 (04:29 +0000)]
Make compiler work on cpp_includes with < in them
Reviewed By: spiantino
Test Plan: build multifeed aggregator
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665518
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 02:39:25 +0000 (02:39 +0000)]
Allow the Thrift compiler to be built without the Java generator.
- Use AX_THRIFT_GEN to make configure support --disable-gen-java
- Update the compiler Makefile.am to exclude the generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665517
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:33 +0000 (01:55 +0000)]
Allow the Thrift compiler to be built without the C++ generator.
- Use AX_THRIFT_GEN to make configure support --disable-gen-cpp
- Update the compiler Makefile.am to exclude the generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665516
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:30 +0000 (01:55 +0000)]
Infrastructure for excluding code generators from the Thrift compiler.
Add a new autoconf macro (a thin wrapper around AC_ARG_ENABLE) that
makes it pretty easy to include or exclude specific code genreators.
This will be tested along with future changes that use it.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665515
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:25 +0000 (01:55 +0000)]
Make the Java generator use non-hardcoded namespaces.
- Make the Java generator use program->get_namespace("java")
instead of program->get_java_namespace()
- Eliminate the explicit "java_namespace" in t_program.
- Deprecate the java_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665514
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:17 +0000 (01:55 +0000)]
Make the C++ generator use non-hardcoded namespaces.
- Make the C++ generator use program->get_namespace("cpp")
instead of program->get_cpp_namespace()
- Eliminate the explicit "cpp_namespace" in t_program.
- Deprecate the cpp_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665513
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:13 +0000 (01:55 +0000)]
Infrastructure for a language-neutral namespace declaration.
Altered the once-deprecated "namespace" directive in .thrift files
to take two identifiers: the language and the namespace.
They are stored in a map inside of the program object.
Future changes will convert specific generators to use this map
and deprecate the old language-specific tokens.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665512
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:09 +0000 (01:55 +0000)]
Remove t_java_generator.h.
t_java_generator.h is no longer included anywhere, because
the Java 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@665511
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:55:05 +0000 (01:55 +0000)]
Make the Java generator dynamic.
- Modify the Java generator constructor to fit the new generic interface.
- Register the Java genrator with the central registry.
- Deprecate the old way of invoking the Java generator.
- main.cc no longer includes t_java_generator.h.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665510
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:54:59 +0000 (01:54 +0000)]
Remove t_cpp_generator.h.
t_cpp_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@665509
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:54:55 +0000 (01:54 +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_cpp_generator.h.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665508
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:54:51 +0000 (01:54 +0000)]
Infrastructure for loading code generators a bit more dynamically.
Add a generic and easy-to-use mechanism for Thrift code generators to
register themselves centrally. The central registry is used to
obtain documentation for the options accepted by individual generators
and get instances of individual generators. It also does a little bit of
option parsing that will be useful for all generators.
Obviously, this change cannot be tested on its own. I can only say
that Thrift still builds and runs correctly. Subsequent changes
will apply this infrastructure to specific code generators.
Steve Grimm has assured me that this is standard Git practice.
In fact, I ran this test after converting the C++ and Java generators:
dreiss@dreiss-vmware:dynamic_generators:thrift/test$ mkdir old new
dreiss@dreiss-vmware:dynamic_generators:thrift/test$ cd old
dreiss@dreiss-vmware:dynamic_generators:thrift/test/old$ ../../compiler/cpp/thrift -cpp -dense -java -javabean ../DebugProtoTest.thrift
[WARNING::1] -cpp is deprecated. Use --gen cpp
[WARNING::1] -java is deprecated. Use --gen java
[WARNING::1] -javabean is deprecated. Use --gen java:beans
dreiss@dreiss-vmware:dynamic_generators:thrift/test/old$ cd ../new/
dreiss@dreiss-vmware:dynamic_generators:thrift/test/new$ ../../compiler/cpp/thrift --gen cpp:dense --gen java --gen java:beans ../DebugProtoTest.thrift
dreiss@dreiss-vmware:dynamic_generators:thrift/test/new$ cd ..
dreiss@dreiss-vmware:dynamic_generators:thrift/test$ diff -ur old/ new/
dreiss@dreiss-vmware:dynamic_generators:thrift/test$
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665507
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 27 Feb 2008 01:54:47 +0000 (01:54 +0000)]
Make warnings from the Thrift compiler a little clearer.
Reviewed by: mcslee
Warning and error messages from the Thrift compiler include
the file currently being parsed and the line number.
This change sets those to dummy values for stages that
have nothing to do with parsing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665506
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Tue, 26 Feb 2008 12:11:29 +0000 (12:11 +0000)]
[thrift] don't do a reverse DNS lookup for every erlang thrift request
Reviewed By: cpiro
Test Plan: ran a server ... verified its debug messages no longer included
hostnames
Notes: methinks this binding is not long for this world
Revert Plan: sure ... if you don't like your dns server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665505
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Tue, 26 Feb 2008 11:44:00 +0000 (11:44 +0000)]
[thrift] better error handling and timeouts in tSocket code
Summary: default socket send timeout to 5seconds, not infinity.
close the socket in case of an error.
Reviewed By: cpiro
Test Plan: ran a client for slow services
and sanity checked other client code to make sure
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665504
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 26 Feb 2008 06:40:25 +0000 (06:40 +0000)]
Tighten integration with Ruby exceptions by tying in Exception#message
For Thrift exceptions that contain only a single string field, integrate
these even more tightly with Ruby exceptions by aliasing Ruby's
Exception#message field with the Thrift field.
Ruby exception objects created by Thrift will now display properly in
Ruby backtraces, etc. without any special handling by client code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665503
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 26 Feb 2008 06:40:22 +0000 (06:40 +0000)]
Move Ruby fielded object creation from generated constructor to ThriftStruct
Rather than the generated code needing to handle simple fielded
creation of objects, the ThriftStruct module constructor is extended to
handle hash arguments. Statements such as
o = ThriftObject.new :field1 => value1, :field2 => value2, ...
are supported as before, and the string form,
o = ThriftObject.new "field1" => value1, "field2" => value2, ...
disabled by the previous patch now also works.
Placing this code in the module is also just a cleaner solution.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665502
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 26 Feb 2008 06:40:16 +0000 (06:40 +0000)]
Ruby exception constructor bugfix
The Ruby exception constructor is modified to accept 0 arguments, which is
how Thrift library code creates exception objects. Without this fix, Thrift
Ruby clients that receive exception objects crash.
The call to super (resolving to ThriftStruct#initialize) is retained, but
is called with the default value (an empty hash) instead of passing the
message along.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665501
13f79535-47bb-0310-9956-
ffa450edef68
veeve [Tue, 26 Feb 2008 05:12:08 +0000 (05:12 +0000)]
add increase_max_fds to the new TServer.cpp
Summary: - added TServer.cpp
- increase_max_fds() defaults to 2^24.
Reviewed By: dreiss
Test Plan: - Linked this code into chatloggerd and verified the return value.
Revert: OK
TracCamp Project: Chirp
DiffCamp Revision: 8275
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665500
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 24 Feb 2008 17:45:03 +0000 (17:45 +0000)]
Use "all-local" instead of all in Makefile.am.
Summary:
Redefining an Automake rule totally blows away anything Automake puts in place.
By using all-local instead of all, we can just add to the generated rule.
Reviewed By: marc
Test Plan: make
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665499
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 24 Feb 2008 16:42:18 +0000 (16:42 +0000)]
Make "make clean" rules a bit more standard.
Summary:
make-generic is some sort of internal undocumented thing.
make-local is what is supposed to be used for this stuff.
Also use $(RM) instead of "rm -f".
Reviewed By: marc
Test Plan: make clean
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665498
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 24 Feb 2008 02:03:17 +0000 (02:03 +0000)]
Make "make check" work properly for Python and Java.
Summary:
The Python and Java versions of "make check" only work if "make all" has
been run. Our automake-fu isn't strong enough to make proper dependencies,
so this hack suggested by Nitay will force the libraries to be built
before make check is run.
Test Plan: make check
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665497
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 23 Feb 2008 22:07:46 +0000 (22:07 +0000)]
Add automake support for running the Java tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665496
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 23 Feb 2008 22:07:43 +0000 (22:07 +0000)]
Update TJSONProtocol to TSimpleJSONProtocol
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665495
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 23 Feb 2008 22:07:39 +0000 (22:07 +0000)]
Add automake support for building the Java library.
If java, javac, and ant are all available, the Java library will be built as part of the standard make target.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665494
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 23 Feb 2008 21:56:16 +0000 (21:56 +0000)]
Thrift: Clean up cleanup.sh and bootstrap.sh
Reviewed By: marc
Test Plan:
dreiss@dreiss-vmware:cleanup:thrift/if$ ../cleanup.sh
dreiss@dreiss-vmware:cleanup:thrift/if$ git clean -nxd
dreiss@dreiss-vmware:cleanup:thrift/if$
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665493
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 21 Feb 2008 22:49:58 +0000 (22:49 +0000)]
Rename TJSONProtocol.java -> TSimpleJSONProtocol.java
Summary:
Chad Walters is developing a full-featured JSON-based protocol for Java,
so we're renaming the existing protocol to something more descriptive.
I also edited the file to rename the class and add to the header comment.
I have no idea if Subversion does explicit rename tracking, or if
git svn is smart enough to mark renames as such, but I would predict
"yes" to both. Let's find out.
Reviewed By: mcslee, jssarma
Test Plan: Ran "ant" in lib/java
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665492
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 21 Feb 2008 22:37:45 +0000 (22:37 +0000)]
TJSONProtocol no longer uses borrow, and miscellaneous fixes.
Summary:
Added a LookaheadReader to the TJSONProtocol so it doesn't have to
rely on the transport to borrow.
Also added a check to a corner case and fixed up some comments and whitespace.
Reviewed By: mcslee
Test Plan: make check
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665491
13f79535-47bb-0310-9956-
ffa450edef68
Christopher Piro [Wed, 20 Feb 2008 08:19:38 +0000 (08:19 +0000)]
[thrift] Erlang thrift_sup will exit if it can't bind to the given address
Summary: before it would complain and not exit. that's not right.
Reviewed By: eletuchy
Test Plan: DEATH ENSUES
Revert Plan: sounds reasonable
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665490
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 20 Feb 2008 05:30:55 +0000 (05:30 +0000)]
Fix a typo in the C# generator.
Actually, it is not a typo. The original authors didn't convert one call
to get_java_package to get_csharp_namespace.
Tested by building Thrift.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665489
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 20 Feb 2008 02:28:05 +0000 (02:28 +0000)]
Fix a typo
Reviewed By: mcslee
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665488
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 19 Feb 2008 22:47:29 +0000 (22:47 +0000)]
Thrift: Add "#include <cstdlib>" in a few places and s/malloc/std::malloc/
Summary:
There were a few places where we were calling malloc/reallaoc/free without
including cstdlib (or stdlib.h). This is broken, but it worked because
other headers that we were including included stdlib.h. However, on a
platform where this wasn't true, it broke the Thrift build. This change
adds the proper includes. It also changes malloc to std::malloc (same
with realloc and free) in a few places, because that is the correct way
of doing it when you include cstdlib.
Reviewed By: mcslee
Test Plan: Compiled Thrift.
Revert Plan: ok
Other Notes:
This bug was noticed by a Thrudb user, and the patch was sent in by
Ross McFarland.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665487
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 18 Feb 2008 02:11:52 +0000 (02:11 +0000)]
Enhance C++ test client to make sure that async void is implemented properly
Summary:
Added another i32 test after the async test. If testAsync improperly
sends a response, then the i32 test will fail because the function
name won't match up, since it will be "off by one".
Test plan:
Tested cpp server and it works. Tested alterl server which
doesn't yet implement async void properly and verified failure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665486
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 18 Feb 2008 02:11:48 +0000 (02:11 +0000)]
Implement testAsync for python tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665485
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 18 Feb 2008 02:11:44 +0000 (02:11 +0000)]
Add testAsync to ThriftTest.thrift which verifies async void works properly.
Summary:
- testAsync takes a number of seconds to sleep. The test client makes sure
that the RPC returns in less than 0.2 seconds even though it asks the server
to sleep for 3 seconds.
- Implemented this test for C++ and Java.
Test Plan:
- ran cpp TestServer and TestClient and verified functionality
- tested cpp and java test server/client against each other - tests passed
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665484
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 18 Feb 2008 02:11:39 +0000 (02:11 +0000)]
Change test scripts for Java to point to libthrift.jar in source tree.
Summary:
- They used to point at /usr/local/lib/libthrift.jar even though the build.xml pointed
at a relative path in the source tree
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665483
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 18 Feb 2008 01:49:37 +0000 (01:49 +0000)]
Thrift: Add a full-featured JSON protocol for C++.
Summary:
This change adds a new and exciting protocol to Thrift. It uses
RFC-compliant JSON as the wire protocol and is fully human readable.
(once a little whitespace has been inserted.) Unlike the existing
JSON protocol for Java, which is intended to allow Thrift data to be
transferred to scripting languages, this protocol is lossless and fully
read-write. It was written by Chad Walters of Powerset and reviewed
by David Reiss.
Tested by running make check.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665482
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 15 Feb 2008 01:38:18 +0000 (01:38 +0000)]
Thrift: Distinguish between string and binary types in C++ and Java.
Summary:
The upcoming TJSONProtocol handles string and binary types quite differently.
This change makes that distinction in all parts of the C++ binding.
Java already distinguished between string and binary, but this change
also updates the Java skip method to skip over strings as binary
so we don't get encoding errors when skipping binary data.
Reviewed By: mcslee
Test Plan: make check
Revert Plan: ok
Other Notes:
I just pulled this out of Chad Walters' JSON patch.
The only other change was adding readBinary (or was it writeBinary)
to TDenseProtocol. Maybe inheriting from TBinaryProtocol wasn't a good idea.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665481
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 15 Feb 2008 01:10:23 +0000 (01:10 +0000)]
Thrift: Python test improvements.
Summary:
- Add a serialization test for forwards/backwards compatibility.
- Hook the Python tests up to "make check".
- Miscellaneous changes to the Python tests.
Reviewed By: mcslee
Test Plan: Ran the test.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665480
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 14 Feb 2008 20:20:08 +0000 (20:20 +0000)]
Thrift: Fix a bug in the skip function in Python's fastbinary.c
Reviewed By: mcslee
Other Notes:
Submitted by Ben Maurer (the original author).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665479
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 13 Feb 2008 22:44:24 +0000 (22:44 +0000)]
[thrift] making generated php struct readers more compact
Summary: introducing a $bin_accel variable in struct reader scope that
can be reference by the deserializers of each field
Reviewed By: dreiss, mcslee
Test Plan: regenerated a thrift service, compared before and after calls
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665478
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 13 Feb 2008 22:41:03 +0000 (22:41 +0000)]
[thrift] grrrr ... TPhpStream can read the string '0'
Summary: php sucks
Reviewed By: mcslee
Test Plan: thrift call with string '0' has same behavior as string '1'
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665477
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Wed, 13 Feb 2008 22:03:15 +0000 (22:03 +0000)]
Fix Java generator for javabean target to construct maps and lists properly
Summary: From Johann Oskarsson
Reviewed By: dreiss
Test Plan: Generate javabean code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665476
13f79535-47bb-0310-9956-
ffa450edef68
eletuchy [Wed, 13 Feb 2008 00:48:15 +0000 (00:48 +0000)]
[erl-thrift] tiny change to exception message for tSocket:connect
Summary: calls integer_to_list on the port
Reviewed By: dreiss
Test Plan: connected a client to non-running server. oh noes, exception.
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665475
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 11 Feb 2008 23:24:47 +0000 (23:24 +0000)]
Thrift: Add some macros to configure.ac.
Summary:
./bootstrap.sh has been throwing warnings because we haven't kept
configure.ac up to date. This fixes that.
Reviewed By: mcslee
Test Plan: ./boostrap.sh
Revert Plan: ok
Other Notes:
Contributed by Dan Sully.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665474
13f79535-47bb-0310-9956-
ffa450edef68
iproctor [Mon, 11 Feb 2008 22:59:01 +0000 (22:59 +0000)]
Thrift haskell getTransport working
Summary: getTransport is now a method of Protocol. To flush the transport one does tflush (getTransport p) instead of pflush p. This is more like how it is done with other languages.
Reviewed By: dcorson
Test Plan: Ran thrifttest for haskell.
Revert: OK
DiffCamp Revision: 7515
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665473
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 9 Feb 2008 02:51:43 +0000 (02:51 +0000)]
Thrift: Fix a bug with local reflection and namespaces.
Summary:
References to "local reflections" in other thrift files were not given
namespace prefixes, give undefined symbol errors. This change
distinguishes between relfection names being generated for declarations
(not namespaced) and those that could be external references (namespaced).
Reviewed By: mcslee
Test Plan:
Got the following files to build and link correctly with -dense.
==> test1.thrift <==
cpp_namespace ns
enum foo { bar }
==> test2.thrift <==
include "test1.thrift"
enum dummy_enum_workaround { I_AM_A_WORKAROUND }
struct baz {
1: test1.foo qux
}
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665472
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Sat, 9 Feb 2008 00:26:29 +0000 (00:26 +0000)]
Getters for input/output protocol in client lib
Summary: Why not, nice to have. From Ted Dziuba.
Reviewed By: dreiss
Test Plan: Build Java compiler.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665471
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Sat, 9 Feb 2008 00:18:32 +0000 (00:18 +0000)]
Use interfaces, not classes for Java gen
Summary: Not AbstractMap or HashSet, etc. use Map, List, Set
Reviewed By: dreiss
Test Plan: Generate Java code and build java tests
Other Notes: Submitted by Seth Falcon
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665470
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Sat, 9 Feb 2008 00:02:26 +0000 (00:02 +0000)]
Patch from Ross McFarland to compile with strict warnings
Summary: Use comment trick in params that are unused to prevent warnings
Reviewed By: dreiss
Test Plan: Generate C++ code and compile -W -Wall
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665469
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 8 Feb 2008 21:58:06 +0000 (21:58 +0000)]
Thrift: Fix a bug in local reflection generation.
Summary:
The problem was that in generate_local_reflection, we refused to
generate reflections for types defined in another program, including enums.
But in local_reflection_name, we treated enums like base types,
assuming that their reflections were always defined in this program.
One solution would be to treat enums like base types everywhere, and always
generate their reflections in the program where they were being used.
But this change takes the opposite approach. We now always
generate fingerprints for enums in the program in which they are defined,
even if they are not used there.
Reviewed By: mcslee
Test Plan:
Got the following files to build and link correctly with -dense.
dreiss@dreiss-vmware:reflection:thrift/test$ tail test[12].thrift
==> test1.thrift <==
enum foo { bar }
==> test2.thrift <==
include "test1.thrift"
struct baz {
1: test1.foo qux
}
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665468
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 6 Feb 2008 22:18:40 +0000 (22:18 +0000)]
Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 6 Feb 2008 22:10:26 +0000 (22:10 +0000)]
Thrift: Update some makefiles to make "make dist" work.
Reviewed By: mcslee
Test Plan: Ran "make dist" and did a diff.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665466
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 6 Feb 2008 22:10:12 +0000 (22:10 +0000)]
Thrift: Add a Makefile to build the C# library with Mono.
Reviewed By: mcslee
Test Plan: Installed Mono and built it.
Revert Plan: ok
Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665465
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 6 Feb 2008 22:09:58 +0000 (22:09 +0000)]
Thrift: Miscellaneous optimizations for C#.
Reviewed By: mcslee
Test Plan: Built it after a future revision.
Revert Plan: ok
Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665464
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 6 Feb 2008 22:09:44 +0000 (22:09 +0000)]
Thrift: String/Binary distinction for C#.
Reviewed By: mcslee
Test Plan: Built it after a future revision.
Revert Plan: ok
Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665463
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 6 Feb 2008 18:22:39 +0000 (18:22 +0000)]
Thrift/Ruby: Bug fix.
Summary:
Some member variables were actually being treated as local variables.
Reviewed By: mcslee
Test Plan: None.
Revert Plan: ok
Other Notes:
Actually reviewed by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665462
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 4 Feb 2008 21:56:27 +0000 (21:56 +0000)]
Thrift: Revamp TMemoryBuffer constructors.
Summary:
There were some weird cases where the implicit conversion from
const char* to std::string was causing the wrong constructor to be called.
There wasn't really a clean workaround, so we're dropping the string
constructors.
Reviewed By: mcslee
Test Plan:
Ran the test.
Grepped around the /projects tree for uses that had to fixed,
and fixed them.
Revert Plan: ok
Other Notes:
This risk was pointed out by Ben Maurer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665461
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Mon, 4 Feb 2008 21:34:22 +0000 (21:34 +0000)]
Make inner Isset classes implement serializable
Summary: Since the outer class is serializable, you'll want it on the inner member too. Though in general you shouldn't be using Java to serialize Thrift objects, as that misses the point and tosses version compatibility out the window.
Reviewed By: dreiss
Test Plan: Generate Java code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665460
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 4 Feb 2008 21:28:20 +0000 (21:28 +0000)]
Thrift: Update CONTRIBUTORS.
Summary:
Forgot to mention in my last commit that the bulk of the change was
submitted by Nitay. Updating the CONTRIBUTORS file while I'm at it.
Reviewed By: mcslee
Test Plan: None.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665459
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 4 Feb 2008 21:14:14 +0000 (21:14 +0000)]
Thrift: "make check" support.
Summary:
Add a Makefile.am in the test directory that runs some of the test programs
when "make check" is executed. Also removed some obsolete comments.
Reviewed By: mcslee
Test Plan:
Ran make check, saw all tests pass.
Ran make install, saw no test programs installed.
Ran ./cleanup.sh, saw a pristine workspace.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665458
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 4 Feb 2008 19:24:00 +0000 (19:24 +0000)]
Thrift: Forgot to dereference a pointer.
Summary:
This didn't get updated when the interface changed,
and the cast silenced the warning message. Stupid C.
Reviewed By: mcslee
Test Plan: Trust Chad Walters.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665457
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 4 Feb 2008 19:23:57 +0000 (19:23 +0000)]
Thrift: Fix a bug in a test program.
Summary:
This didn't get updated when the class was renamed.
Reviewed By: mcslee
Test Plan: Trust Chad Walters.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665456
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 2 Feb 2008 00:54:55 +0000 (00:54 +0000)]
Thrift: Make borrow (almost) always succeed for TBufferedTransport.
Chad Walters is writing a JSON protocol for Thrift, but he wants
borrow to always succeed. That would be a pain to implement,
but here is a first step: borrow will almost always work with
TBufferedTransport.
Reviewed by: mcslee
Test Plan: Ran the DenseProtocol test and Zlib test, but more needs to be done.
Other Notes:
Also reviewed by Chad Walters, and maybe Ben Maurer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665455
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sat, 2 Feb 2008 00:54:48 +0000 (00:54 +0000)]
Thrift: Update the interface for TTransport's "borrow" method.
Summary:
I don't know what I was thinking when I first wrote this.
It makes sense that the transport might not want to allocate its own memory,
so the protocol is expected to provide a buffer for the data.
However, if the transport already has the data buffered,
there is no need to memcpy it; it can just return a pointer into its buffer.
The new interface still requires the protocol to provide a buffer,
but allows the transport to return a pointer to an interal buffer.
In addition, I made len a pass-by-pointer parameter so that
the transport can return more than the requested data if it has it
available in its buffers.
Reviewed By: mcslee
Test Plan: Ran the DenseProtocol test and the Zlib test.
Revert Plan: ok
Other Notes:
Also got this reviewed by Chad Walters from Powerset.
Ben Maurer suggested making len a reference parameter.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665454
13f79535-47bb-0310-9956-
ffa450edef68
dweatherford [Fri, 1 Feb 2008 20:42:56 +0000 (20:42 +0000)]
[thrift] Fix generated T_LIST push_back() for cpptype override
Summary: Thrift compiler emitting code missing a closing paren:
"this->extras.push_back(_elem18;"
Reviewed by: eletuchy
Test plan: rebuild some feed code that uses cpptype overrides
Revert: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665453
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Fri, 1 Feb 2008 01:36:26 +0000 (01:36 +0000)]
Fix to the throws clause validation
Summary: Types from external files are not resolved until the program parse pass, not the include one. Therefore, only do full type validation once after all includes have been parsed and external type pointers resolved.
Reviewed By: aditya
Test Plan: build ServiceManager.thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665452
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Thu, 31 Jan 2008 22:02:26 +0000 (22:02 +0000)]
If a list has a custom CPP type, use push_back
Summary: Can't deserialize by reference into std::list, for example
Reviewed By: dweatherford
Test Plan: Build feed
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665451
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Thu, 31 Jan 2008 01:49:16 +0000 (01:49 +0000)]
Validate that throws clauses in Thrift contain only exceptions
Summary: Throwing non-exceptions, though allowed in some languages, is a weird concept and causes problems in many places. Disallow it in the Thrift compiler and throw an informative error.
Reviewed By: dreiss
Test Plan: Generate a file with an int or something in a throws clause. Peep the nice informative compiler error.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665450
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Thu, 31 Jan 2008 00:06:29 +0000 (00:06 +0000)]
Improve C++ vector deserialization
Summary: Use std::vector::resize() method to default construct placeholder elements. Then grab references via operator[] to deserialize directly into the vector, instead of copy-constructing elements in.
Reviewed By: hzhao
Test Plan: test/cpp contains list serialization/deserialization checks
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665449
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Wed, 30 Jan 2008 23:23:15 +0000 (23:23 +0000)]
Improve Thrift map deserialization code
Summary: Instead of copy-constructing map values into the map, alter the code such that we insert default-constructed elements into the map and then deserialize them by reference.
Reviewed By: hzhao
Test Plan: Ran the test in test/cpp which include serialization and deserialization of nested maps.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665448
13f79535-47bb-0310-9956-
ffa450edef68
Christopher Piro [Wed, 30 Jan 2008 01:39:01 +0000 (01:39 +0000)]
[thrift] iolists and binaries in Erlang
Summary: three related changes:
* for numeric types in tBinaryProtocol call effectful_write with binary(), not [char()]
* tBinaryProtocol:writeString now takes either [char()], iolist(), or binary() ... now you can use any of the three where a Thrift string is required
* tBufferedTransport now buffers by building an iolist() rather than Buffer++Data. zomg.
Reviewed By: eletuchy
Test Plan: everything seems to work as usual, and binary() works as expected
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665447
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 28 Jan 2008 20:47:00 +0000 (20:47 +0000)]
Thrift/Ruby: Generate nicer constructors for Thrift structs.
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665446
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 28 Jan 2008 20:46:57 +0000 (20:46 +0000)]
Thrift/Ruby: Allow some thrift exceptions to use standard Ruby syntax.
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665445
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 28 Jan 2008 20:46:53 +0000 (20:46 +0000)]
Thrift/Ruby: TSimpleServer closes its listen socket on an uncaught exception.
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665444
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 28 Jan 2008 20:46:50 +0000 (20:46 +0000)]
Thrift/Ruby: Remove a debugging message.
Submitted by William Morgan.
Approved by Kevin Clark.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665443
13f79535-47bb-0310-9956-
ffa450edef68