common/thrift.git
17 years agoThrift: Revamp build to use a single configure.ac.
David Reiss [Fri, 28 Dec 2007 18:25:33 +0000 (18:25 +0000)] 
Thrift: Revamp build to use a single configure.ac.

Summary:
Ben Maurer suggested that it would make sense for Thrift to build as
a single project, with one configure.ac and multiple Makefile.am.
He was also kind enough to do the heavy lifting, and this commit
is the application of his patch (with minor modifications).
The most significant visible change from this diff is that
in order to buidl one of the thrift sub-projects (i.e.: the compiler,
the C++ library, or the Python library) you must run bootstrap.sh
and configure in the Thrift root, then make in the specific project.
Users who want to build and install the Python library but
can't run configure because they don't have Boost can simply
run setup.py directly.

Reviewed By: mcslee

Test Plan: Built Thrift from scratch.

Revert Plan: ok

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

17 years ago[thrift] service functions that begin with a Capital now work for Erlang ...
eletuchy [Thu, 27 Dec 2007 15:20:14 +0000 (15:20 +0000)] 
[thrift] service functions that begin with a Capital now work for Erlang ...

Summary: ... The main interface function has the same name, but as an escaped atom
         (ie 'CapitalizedFun'(Arg1, Arg2) -> is the function sig)

Reviewed by: dweatherford

Test Plan: tested with the following thrift
     service foo {
         Struct1 CapitalizedFun(1: list<Struct2> param);
     }

     Generated erlang code now compiles

Revert Plan: sure

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

17 years agoThrift: Wide string support for Perl.
David Reiss [Wed, 26 Dec 2007 20:23:03 +0000 (20:23 +0000)] 
Thrift: Wide string support for Perl.

Summary:
This patch allows the TBinaryProtocol to encode wide character strings
as UTF-8 before serializing.  It does not support decoding when receiving.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

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

17 years ago-- Allow ThreadPoolManager tp return immediately from addTask
Aditya Agarwal [Tue, 25 Dec 2007 22:58:50 +0000 (22:58 +0000)] 
-- Allow ThreadPoolManager tp return immediately from addTask

Summary:
- it should be possible to specify a zero timeout if the pendingTaskQueue
  is already full

Reviewed By: marc

Test Plan:
- Tested in search

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

17 years agoMake base set_name take const std:string& instead of std:string
Mark Slee [Fri, 21 Dec 2007 23:53:10 +0000 (23:53 +0000)] 
Make base set_name take const std:string& instead of std:string

Summary: All the subclasses do that so it causes warnings not to and is dumb because copy constructing std::string is dumb

Reviewed By: kholst

Test Plan: Generate some codes, compile with -Werror

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

17 years agoMake "args" reserved in thrift
Mark Slee [Fri, 21 Dec 2007 23:52:19 +0000 (23:52 +0000)] 
Make "args" reserved in thrift

Summary: Breaks the generated python code

Reviewed By: dcorson

Test Plan: Get an error if you use "args" as a variable name in Thrift.

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

17 years ago[thrift] Make TTransportException::getType const throw()
dweatherford [Fri, 21 Dec 2007 07:07:31 +0000 (07:07 +0000)] 
[thrift] Make TTransportException::getType const throw()

Summary: const so that catching via "catch (const TTransportException& e)" works
  properly, and throw() for good convention.
Reviewed By: mcslee
Test Plan: still compiles
Revert: ok

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

17 years agoThrift: A hack to prevent incorrect usage of Mutex Guards.
David Reiss [Thu, 20 Dec 2007 21:42:05 +0000 (21:42 +0000)] 
Thrift: A hack to prevent incorrect usage of Mutex Guards.

Reviewed By: boz

Test Plan:
dreiss@dreiss-vmware:safe_concurrency:thrift/test$ nl -ba guard_test.cc
     1  #include "../lib/cpp/src/concurrency/Mutex.h"
     2  using facebook::thrift::concurrency::Guard;
     3  void test() {
     4    facebook::thrift::concurrency::Mutex m;
     5    Guard(m);
     6    Guard g1(m);
     7
     8    facebook::thrift::concurrency::ReadWriteMutex rwm;
     9    facebook::thrift::concurrency::RWGuard(m);
    10    facebook::thrift::concurrency::RWGuard g2(rwm);
    11  }
dreiss@dreiss-vmware:safe_concurrency:thrift/test$ g++ -c guard_test.cc
guard_test.cc: In function ‘void test()’:
guard_test.cc:5: error: ‘incorrect_use_of_Guard’ was not declared in this scope
guard_test.cc:9: error: ‘incorrect_use_of_RWGuard’ is not a member of ‘facebook::thrift::concurrency’
dreiss@dreiss-vmware:safe_concurrency:thrift/test$

Revert Plan: ok

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

17 years agois_a is deprecated, instanceof only takes vars or constants
Mark Slee [Thu, 20 Dec 2007 03:23:27 +0000 (03:23 +0000)] 
is_a is deprecated, instanceof only takes vars or constants

Summary: Solution, dummy static class var to use instanceof

Reviewed By: dweatherford

Test Plan: Regen'd some mobile code in trunk using this

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

17 years ago[thrift] squelch crash reports in Erlang R12B-0
Christopher Piro [Wed, 19 Dec 2007 00:00:39 +0000 (00:00 +0000)] 
[thrift] squelch crash reports in Erlang R12B-0

Summary: there's a new format for errors in R12B-0, so don't echo a crash report if it matches the new one

Reviewed By: eletuchy

Test Plan: completely unnecessary

Revert Plan: ok

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

17 years agoThrift: Optional support for new-style classes.
David Reiss [Tue, 18 Dec 2007 03:37:30 +0000 (03:37 +0000)] 
Thrift: Optional support for new-style classes.

Reviewed By: mcslee

Test Plan: Thrifted ThriftTest.thrift and looked at the output.

Revert Plan: ok

Other Notes:
Based on a patch from Jon Dugan.

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

17 years agoThrift: Make default values for base types work in Java.
David Reiss [Tue, 18 Dec 2007 02:54:06 +0000 (02:54 +0000)] 
Thrift: Make default values for base types work in Java.

Summary:
The Java generator wasn't setting default values for base types
in the zero argument constructor.  This check was probably brought over
from the C++ generator, where base types are given their default values
in the member variable initializer list (or whatever that thing is called).

Blame Rev: Somewhere in the mysterious past.  I tried to find it, but failed.

Reviewed By: mcslee

Test Plan: Recompiled Thrift and thrifted a file that showed the bug.

Revert Plan: ok

Other Notes:
Bug reported by Jake Luciani.

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

17 years agoPrivate methods called not via self.
Mark Slee [Tue, 18 Dec 2007 02:06:44 +0000 (02:06 +0000)] 
Private methods called not via self.

Summary: Because self. puts you in public scope

Reviewed By: mcslee

Test Plan: Use Ruby framed transport

Other Notes: Submitted by Jake Luciani

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

17 years agoThrift: Fix a bug in the Java runtime.
David Reiss [Mon, 17 Dec 2007 09:49:10 +0000 (09:49 +0000)] 
Thrift: Fix a bug in the Java runtime.

Reviewed By: mcslee

Test Plan: Looked at the C++ version side-by-side.

Revert Plan: ok

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

17 years agoThrift: Set an svn property and updated the CONTRIBUTORS file.
David Reiss [Sat, 15 Dec 2007 00:09:54 +0000 (00:09 +0000)] 
Thrift: Set an svn property and updated the CONTRIBUTORS file.

Reviewed By: mcslee

Test Plan: none

Revert Plan: ok

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

17 years agoThrift: Python support for Unix-domain sockets, and eager timeout setting.
David Reiss [Fri, 14 Dec 2007 23:46:47 +0000 (23:46 +0000)] 
Thrift: Python support for Unix-domain sockets, and eager timeout setting.

Reviewed By: mcslee

Test Plan: Ran the test script.

Revert Plan: ok

Other Notes:
Contributed by Ben Maurer.

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

17 years agoThrift: Maximum read length for Java.
David Reiss [Fri, 14 Dec 2007 22:14:47 +0000 (22:14 +0000)] 
Thrift: Maximum read length for Java.

Summary:
A feature to improve handling of invalid wire data by the Java Thrift library.

Reviewed By: mcslee

Test Plan: I trust Dave Engberg.

Revert Plan: ok

Other Notes:
Submitted by Dave Engberg.

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

17 years agoThrift: Fix dangling pointer errors and make messages a bit more uniform.
David Reiss [Fri, 14 Dec 2007 20:56:04 +0000 (20:56 +0000)] 
Thrift: Fix dangling pointer errors and make messages a bit more uniform.

Reviewed By: mcslee

Test Plan: Honestly, just built the library.

Revert Plan: ok

Other Notes:
Thanks to Ben Maurer.

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

17 years agoThrift: Smalltalk prefix support.
David Reiss [Fri, 14 Dec 2007 07:03:03 +0000 (07:03 +0000)] 
Thrift: Smalltalk prefix support.

Reviewed By: mcslee

Test Plan: Built the compiler.

Revert Plan: ok

Other Notes:
Contributed by Ben Matasar.
Signed off by Patrick Collison.

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

17 years agoUse HAVE_SYS_TIME_H instead of HAVE_CLOCK_GETTIME
Mark Slee [Thu, 13 Dec 2007 22:47:33 +0000 (22:47 +0000)] 
Use HAVE_SYS_TIME_H instead of HAVE_CLOCK_GETTIME

Summary: Still need the right include here

Reviewed By: mcslee

Test Plan: Paul Saab used this fix to build on Leopard

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

17 years ago[Thrift] message debugging for std::exceptions
pfung [Thu, 13 Dec 2007 22:30:47 +0000 (22:30 +0000)] 
[Thrift] message debugging for std::exceptions

std::exceptions did not have debug messages printed

reviewed by dreiss
test plan: compiles

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

17 years agoFix to TThriftTransport corruption detection
James Wang [Thu, 13 Dec 2007 19:46:27 +0000 (19:46 +0000)] 
Fix to TThriftTransport corruption detection

Summary: O_APPEND means that even if the file pointer is in the middle of the file, the next write will go to the end of the file. So when initializing the TThriftTransport to be written to, we need to truncate the file after the last good event.  I'm pretty sure this was what was causing queuemap log corruption when the multiplexer is restarted.

         The corruption doesn't necessarily go away at the next chunk boundary because of the offset being recalculated.  I think it's good to have the offset recalculated, but then we shouldn't use the old chunk boundary data there, but rather use the newly calculated offset to determine the padding (could be an entire chunk, but that's okay -- way better than corruption)

Reviewed By: mcslee

Test Plan: Wrote to a ThriftFile using local scribe instance. Printed it. Then cat'd garbage to it from the command line. Then wrote to it again. Then printed it again.  Seems to work fine, whereas with old scribe binary the later entries were corrupted.

Revert: OK

DiffCamp Revision: 4683

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

17 years ago-- better error checking for setRecvTimeout and setSendTimeout
Aditya Agarwal [Tue, 11 Dec 2007 22:23:51 +0000 (22:23 +0000)] 
-- better error checking for setRecvTimeout and setSendTimeout

Summary:
- could help prevent a 2.6.13 kernel bug

Reviewed By: mcslee, dreiss

Test Plan:
- Testing kernel crashes

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

17 years agoFailing to init eventBase_ to NULL in one constructor
Mark Slee [Wed, 5 Dec 2007 23:20:54 +0000 (23:20 +0000)] 
Failing to init eventBase_ to NULL in one constructor

Reviewed By: dreiss

Test Plan: See if scribe works for powerset

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

17 years agoMerge Ruby framed transport
Mark Slee [Wed, 5 Dec 2007 23:13:11 +0000 (23:13 +0000)] 
Merge Ruby framed transport

Summary: Submitted by Jake Luciani

Reviewed By: mcslee

Test Plan: Test code included in this commit

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

17 years agoRemove unnecessary mutex from C++ socket code
Mark Slee [Wed, 5 Dec 2007 23:03:37 +0000 (23:03 +0000)] 
Remove unnecessary mutex from C++ socket code

Summary: This is a threadsafe syscall, as it turns out.

Reviewed By: hzhao

Test Plan: Thrift Client C++ sockets don't lock

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

17 years ago[thrift] Better default TApplicationException messages
dweatherford [Wed, 5 Dec 2007 03:40:19 +0000 (03:40 +0000)] 
[thrift] Better default TApplicationException messages

Summary: "Default TApplicationException" is pretty meaningless; if we have this
  extra type information, we might as well present it.

Reviewed By: mcslee
Test Plan: caught a couple of INVALID_MESSAGE_TYPE tapplicationexceptions
Revert: ok

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

17 years agoThrift: Make some server methods public.
David Reiss [Fri, 30 Nov 2007 20:38:49 +0000 (20:38 +0000)] 
Thrift: Make some server methods public.

Reviewed By: mcslee

Test Plan: Compiles.

Revert Plan: ok

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

17 years agoFix bug that double-initializes list objects in deserialization.
Mark Slee [Fri, 30 Nov 2007 01:43:36 +0000 (01:43 +0000)] 
Fix bug that double-initializes list objects in deserialization.

Reviewed By: jssarma

Test Plan: Regenerate Java code, check list deserializer for no double-object instantiation

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

17 years agoCustom HTTP headers patch from Dave Engberg
Mark Slee [Thu, 29 Nov 2007 02:57:34 +0000 (02:57 +0000)] 
Custom HTTP headers patch from Dave Engberg

Reviewed By: mcslee

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

17 years agoThrift compiler now enforces uniqueness of field identifiers
Mark Slee [Wed, 28 Nov 2007 22:28:13 +0000 (22:28 +0000)] 
Thrift compiler now enforces uniqueness of field identifiers

Summary: The code would either not generate, or generate code with errors, if you did this beforehand. Now it's a die-fast stop hard error since this is absolultely always a wrong thing to do.

Reviewed By: dreiss

Test Plan: Test compiling a .thrift file with a repeated field identifier in a struct or arglist.

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

17 years agoThrift: Fix a backwards change.
David Reiss [Wed, 28 Nov 2007 20:15:11 +0000 (20:15 +0000)] 
Thrift: Fix a backwards change.

Summary:
Got it right in trunk, but wrong in thrift.

Blame Rev: 69504

Reviewed By: mcslee

Test Plan:
Tested in trunk AND did a diff with trunk.

Revert Plan: ok

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

17 years agoAdd pkgconfig to Thrift C++ libraries
Mark Slee [Wed, 28 Nov 2007 05:54:33 +0000 (05:54 +0000)] 
Add pkgconfig to Thrift C++ libraries

Reviewed By: mcslee

Other Notes: Submitted by Ben Maurer

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

17 years agoFix typo in Thrift trunk
Mark Slee [Wed, 28 Nov 2007 04:29:25 +0000 (04:29 +0000)] 
Fix typo in Thrift trunk

Summary: $classl => $class

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

17 years agoLowercase autoload strings
Mark Slee [Wed, 28 Nov 2007 04:17:49 +0000 (04:17 +0000)] 
Lowercase autoload strings

Summary: PHP is undebatably the worst programming language in the world. Class names are case insensitive, so new $tHiNg = new $THing. Garbase. Now autoload has to deal with the fallout.

Reviewed By: dreiss

Test Plan: autoload enabled falcon code

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

17 years agoKill fast binary compliance in TBase, it doesn't work
Mark Slee [Wed, 28 Nov 2007 02:46:24 +0000 (02:46 +0000)] 
Kill fast binary compliance in TBase, it doesn't work

Reviewed By: akhil

Test Plan: Regenerate code

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

17 years agoComplete the proper handling of all special characters in JSON strings for TJSONProtocol
Mark Slee [Wed, 28 Nov 2007 02:45:13 +0000 (02:45 +0000)] 
Complete the proper handling of all special characters in JSON strings for TJSONProtocol

Reviewed By: dreiss

Test Plan: test/java/TestClient

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

17 years agoMake inheriting from TBase and using inherited read method optional in generated...
Mark Slee [Wed, 28 Nov 2007 02:39:59 +0000 (02:39 +0000)] 
Make inheriting from TBase and using inherited read method optional in generated Thrift PHP code

Reviewed By: dreiss, akhil

Test Plan: Generate falcon etc. without -phpo and check it out

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

17 years agoCreate a TServerEventHandler interface in TServer
Mark Slee [Wed, 28 Nov 2007 01:51:43 +0000 (01:51 +0000)] 
Create a TServerEventHandler interface in TServer

Summary: Such that users can supply an event handler to a server that will be used to signal various events that take place inside the server core.

Reviewed By: dreiss

Test Plan: Rebuilt all servers, work by default

Other Notes: Partially submitted and also reviewed by Dave Simpson at Powerset

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

17 years agoAdd a few utility methods and helpers to Thrift C++ Sockets
Mark Slee [Wed, 28 Nov 2007 00:12:11 +0000 (00:12 +0000)] 
Add a few utility methods and helpers to Thrift C++ Sockets

Summary: Submitted by Dave Simpson @ Powerset.

Reviewed By: mcslee

Test Plan: test/cpp

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

17 years agoClean up the TSerializer
Mark Slee [Tue, 27 Nov 2007 21:54:38 +0000 (21:54 +0000)] 
Clean up the TSerializer

Summary: Nested Transport subclass wasn't necessary, add comments

Reviewed By: dreiss

Test Plan: Same as before, test/java/TestClient

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

17 years agoIPv6 tweaks for Thrift
Mark Slee [Tue, 27 Nov 2007 08:42:19 +0000 (08:42 +0000)] 
IPv6 tweaks for Thrift

Summary: Need to pass hints including AI_ADDRCONFIG to getaddrinfo to make sure no IPv6 addresses come back on non-IPv6 enabled systems

Reviewed By: mcslee

Other Notes: Submitted by Paul Saab

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

17 years agoTJSONProtocol writing support in Java
Mark Slee [Tue, 27 Nov 2007 08:38:52 +0000 (08:38 +0000)] 
TJSONProtocol writing support in Java

Summary: TJSONProtocol for Java with write support and a TSerializer utility for easier conversion of Thrift objects into byte[] or strings.

Reviewed By: dreiss

Test Plan: Included a basic piece of this in test/ client for Java.

Revert: OK

DiffCamp Revision: 3890

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

17 years agoFix writeContainerEnd call being inside loop instead of after loop
Mark Slee [Tue, 27 Nov 2007 08:38:16 +0000 (08:38 +0000)] 
Fix writeContainerEnd call being inside loop instead of after loop

Summary: Potentailly breaks Java serialization for protocols that care about container termination.

Reviewed By: dreiss

Test Plan: Generate code, veirfy writeListEnd/writeSetEnd is in the apporpriate place

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

17 years agoMerging EOFException changes from Ben Maurer
Mark Slee [Mon, 26 Nov 2007 21:15:40 +0000 (21:15 +0000)] 
Merging EOFException changes from Ben Maurer

Summary: Throw a proper EOFError in this case. Long term we want to change this to properly fit into the Thrift TException heirarchy with a good way to handle the original exception as well. For now, Ben is the primary user of this so we'll go ahead with his patch.

Reviewed By: mcslee

Test Plan: Included in test/py/TestEof.py

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

17 years agoRefactor TNonblockingServer to use event_base construct
Mark Slee [Mon, 26 Nov 2007 19:05:29 +0000 (19:05 +0000)] 
Refactor TNonblockingServer to use event_base construct

Summary: This allows the event loop to be shared across different components of a program of for a separate thread in a TNonblockingServer to safely use its own libevent code without conflicts.

Reviewed By: mcslee

Test Plan: Updated test/ committed here

Other Notes: submitted by Ben Maurer, patched in by mcslee with slight modifications

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

17 years agolibtoolize and configure tweaks for Thrift compiler
Mark Slee [Wed, 21 Nov 2007 23:35:52 +0000 (23:35 +0000)] 
libtoolize and configure tweaks for Thrift compiler

Summary: Need glibtoolize on OSX.

Reviewed By: mcslee

Other Notes: From Paul Collison

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

17 years agoDouble-free Cocoa fix: Redux
Mark Slee [Wed, 21 Nov 2007 22:05:50 +0000 (22:05 +0000)] 
Double-free Cocoa fix: Redux

Summary: Need get_true_type to evaluate string status

Reviewed By: mcslee

Other Notes: Submission from Andrew McGeachie

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

17 years agoMerging in some Smalltalk changes from Patrick Collison
Mark Slee [Wed, 21 Nov 2007 08:43:35 +0000 (08:43 +0000)] 
Merging in some Smalltalk changes from Patrick Collison

Reviewed By: mcslee

Test Plan: Rebuild Thrift compiler

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

17 years agoFix cocoa double-free issue with strings
Mark Slee [Tue, 20 Nov 2007 23:55:33 +0000 (23:55 +0000)] 
Fix cocoa double-free issue with strings

Reviewed By: mcslee

Other Notes: Submitted by Andrew McGeachie

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

17 years agoComplete rb test server with testEnum and testTypedef
Mark Slee [Tue, 20 Nov 2007 05:54:13 +0000 (05:54 +0000)] 
Complete rb test server with testEnum and testTypedef

Reviewed by: mcslee

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

17 years agoAdd Smalltalk support to Thrift
Mark Slee [Tue, 20 Nov 2007 05:13:09 +0000 (05:13 +0000)] 
Add Smalltalk support to Thrift

Summary: Submitted by Patrick Collison

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

17 years agoMake Java TBinaryProtocol default to strictWrite
Mark Slee [Tue, 20 Nov 2007 04:58:16 +0000 (04:58 +0000)] 
Make Java TBinaryProtocol default to strictWrite

Summary: About time we did this. Breaks the test suite's defaults

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

17 years agoAdd (int) case to Thrift version comparison
Mark Slee [Tue, 20 Nov 2007 02:06:47 +0000 (02:06 +0000)] 
Add (int) case to Thrift version comparison

Summary: Deals with 32 bit machines doing a weird sign-bit thing here.

Reviewed By: dreiss

Test Plan: For 32 bit AmieStreet partners

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

17 years agoDo not generate constants php files from Thrift when they will be empty
Mark Slee [Tue, 20 Nov 2007 02:05:29 +0000 (02:05 +0000)] 
Do not generate constants php files from Thrift when they will be empty

Summary: That's just silly

Reviewed By: peter, dreiss

Test Plan: Generate PHP from a .thrift with no constants. Notice there is no _constants.php generated.

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

17 years agoCocoa Thrift binding patches from Andrew McGeachie
Mark Slee [Tue, 20 Nov 2007 01:39:25 +0000 (01:39 +0000)] 
Cocoa Thrift binding patches from Andrew McGeachie

Summary: Latest updates to the Cocoa bindings

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

17 years agoIPv6 support for the TNonBlockingServer
Mark Slee [Tue, 20 Nov 2007 01:27:08 +0000 (01:27 +0000)] 
IPv6 support for the TNonBlockingServer

Summary: Need to use IPv6 compliant constructs here. Submitted by Paul Saab.

Reviewed By: dreiss

Test Plan: Rebuild Thrift TNonblockingServer with this patch and verify behaves just the same

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

17 years agoadded trunk
hzhao [Sun, 18 Nov 2007 20:54:30 +0000 (20:54 +0000)] 
added trunk

Reviewed By: shire
Test Plan: ape work

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

17 years agotagging thrift-protocol-1.0.0
hzhao [Sun, 18 Nov 2007 20:48:56 +0000 (20:48 +0000)] 
tagging thrift-protocol-1.0.0

Reviewed By: shire
Test Plan: ape work

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

17 years ago[thrift] gut Erlang exception handling
Christopher Piro [Sun, 18 Nov 2007 02:10:20 +0000 (02:10 +0000)] 
[thrift] gut Erlang exception handling

Summary: * move type field to tException from subclasses
          * add backtrace to tException
          * add oop:is_a
          * on exit, wrap exceptions in {thrift_exception, E} ... otherwise can't distinguish e.g. exit:{{tBinProtException, {tException, ...}}, Stack} vs. exit:{tBinProtException, {tException, ...} -- I hate erlang
          * all throws/exits to tException:throw which does the wrapping described above

Reviewed By: eletuchy

Test Plan: been using this code on my live server ^_^

Revert: OK

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

17 years agoAdd __autoload() support to Thrift-generated PHP code
Mark Slee [Sat, 17 Nov 2007 00:32:36 +0000 (00:32 +0000)] 
Add __autoload() support to Thrift-generated PHP code

Summary: Include thrift/autoload.php and use -phpa flag to generated code that works with autoload. Good for services with lots of methods that are typically not all invoked.

Reviewed By: dreiss

Test Plan: Falcon, baby, falcon.

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

17 years agoFix PHP TBufferedTransport readAll() to work with TSocket timeouts
Mark Slee [Sat, 17 Nov 2007 00:27:17 +0000 (00:27 +0000)] 
Fix PHP TBufferedTransport readAll() to work with TSocket timeouts

Reviewed By: lucas

Test Plan: Invoke Buffered Transport wrapped around socket

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

17 years ago[thrift] Fix extension deserialization call with no classname
dweatherford [Fri, 16 Nov 2007 03:29:47 +0000 (03:29 +0000)] 
[thrift] Fix extension deserialization call with no classname

Summary: The extension expects a classname as a string and does not allow null;
  use the empty string instead of null in the absence of a classname to pass.

Reviewed By: mcslee
Test Plan: php -l
Revert: svn

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

17 years agoMake sure to lazily initialize $TSPEC for structs even with no members
Mark Slee [Fri, 16 Nov 2007 03:27:22 +0000 (03:27 +0000)] 
Make sure to lazily initialize $TSPEC for structs even with no members

Reviewed By: dweatherford

Test Plan: Generate code with no E_ALL for method-less args

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

17 years agoFix namespacing of included enum types in C++ generated code
Mark Slee [Fri, 16 Nov 2007 02:48:52 +0000 (02:48 +0000)] 
Fix namespacing of included enum types in C++ generated code

Summary: If you reference enum types from an include you need to fully qualify their namespace in the generated C++ code.

Reviewed By: pfung

Test Plan: fbtypes code that pfung is using

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

17 years ago[thrift] Erlang client calls return value from recv_
Christopher Piro [Thu, 15 Nov 2007 06:26:32 +0000 (06:26 +0000)] 
[thrift] Erlang client calls return value from recv_

Summary: only return `ok' if it's an async, otherwise return the value of recv_

Reviewed By: cvarenhorst

Test Plan: my server works now

Revert Plan: ok

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

17 years ago[thrift] fix-ups to Erlang thrift_logger
Christopher Piro [Thu, 15 Nov 2007 06:26:31 +0000 (06:26 +0000)] 
[thrift] fix-ups to Erlang thrift_logger

Summary:
 * no ?INFO for every oop:call ... way too expensive
 * unfactor symbol/1 ... it was that way for a reason apparently
 * upped crash report depth to 3

Reviewed By: eletuchy

Test Plan: /much/ less CPU eaten by logging

Revert Plan: ok

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

17 years ago[thrift] change up Erlang crash reports, cleanups in t{,Binary}Protocol
Christopher Piro [Thu, 15 Nov 2007 06:26:30 +0000 (06:26 +0000)] 
[thrift] change up Erlang crash reports, cleanups in t{,Binary}Protocol

Summary: crash reports aren't too important so don't be so verbose -- all the pertinent info shows up elsewhere anyway.  refactor while we're at it.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years ago[thrift] remove trailing-whitespace-generating code from t_erl_generator.cc
Christopher Piro [Thu, 15 Nov 2007 06:26:29 +0000 (06:26 +0000)] 
[thrift] remove trailing-whitespace-generating code from t_erl_generator.cc

Summary: meta

Reviewed By: dcorson

Test Plan: M-x delete-trailing-whitespace does nothing

Revert Plan: ok

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

17 years ago[thrift] remove tabs from t_erl_generator.cc
Christopher Piro [Thu, 15 Nov 2007 06:26:29 +0000 (06:26 +0000)] 
[thrift] remove tabs from t_erl_generator.cc

Summary: ididntdoit

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years ago[thrift] whole ball of whitespace normalizations in Erlang
Christopher Piro [Thu, 15 Nov 2007 06:26:28 +0000 (06:26 +0000)] 
[thrift] whole ball of whitespace normalizations in Erlang

Summary: ill-formatted comments, trailing whitespace, and (gasp) tabs: all pwned.  better now than later.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years ago[thrift] make open and close `effectful' in Erlang client
Christopher Piro [Thu, 15 Nov 2007 06:26:27 +0000 (06:26 +0000)] 
[thrift] make open and close `effectful' in Erlang client

Summary: make uniform across all tTransports.  god i want `effectful' to go away dead.  soon.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years ago[thrift] Erlang client receive socket options
Christopher Piro [Thu, 15 Nov 2007 06:26:26 +0000 (06:26 +0000)] 
[thrift] Erlang client receive socket options

Summary: we want {active, false}, etc. for client sockets.  make it so.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years ago[thrift] Erlang makefile includes to terse messages
Christopher Piro [Thu, 15 Nov 2007 02:20:59 +0000 (02:20 +0000)] 
[thrift] Erlang makefile includes to terse messages

Summary: filter out compiler path and flags and cruft

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years ago[thrift] convert oop.erl errors and infos to macros
Christopher Piro [Thu, 15 Nov 2007 02:20:58 +0000 (02:20 +0000)] 
[thrift] convert oop.erl errors and infos to macros

Summary: old-style error messages get switched over

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

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

17 years agoChange Thrift to lazily instantiate $_TSPEC objects on first object instantiation
Mark Slee [Wed, 14 Nov 2007 00:24:14 +0000 (00:24 +0000)] 
Change Thrift to lazily instantiate $_TSPEC objects on first object instantiation

Summary: Apparently adding the static array costs overhead since it must get preinitialized or something? It's unclear exactly what's going on here, but let's test to see if explicit lazy instantiation helps here.

Reviewed By: dreiss

Test Plan: See if this speeds up falcon loading

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

17 years agoThrift: Fix new-style generated PHP code.
David Reiss [Tue, 13 Nov 2007 21:41:29 +0000 (21:41 +0000)] 
Thrift: Fix new-style generated PHP code.

Summary:
Fix reading of lists/sets of lists/sets/maps.

Reviewed By: mcslee

Test Plan: Tested in trunk.

Revert Plan: ok

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

17 years agoThrift: Fix new-style generated PHP code.
David Reiss [Tue, 13 Nov 2007 11:55:06 +0000 (11:55 +0000)] 
Thrift: Fix new-style generated PHP code.

Summary:
We were generating a fatal when constructing a struct with an argument.

Reviewed By: lucas

Test Plan: None.

Revert Plan: ok

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

17 years agoMerging PHP transport changes from www trunk to thrift trunk
Mark Slee [Tue, 13 Nov 2007 10:19:08 +0000 (10:19 +0000)] 
Merging PHP transport changes from www trunk to thrift trunk

Summary: Some empty() fixes, plus a few other socket helpers

Reviewed By: lucas

Test Plan: Use the transports to make IPC calls!

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

17 years agoNeed to properly namespace the php class names in typespec
Mark Slee [Tue, 13 Nov 2007 05:53:44 +0000 (05:53 +0000)] 
Need to properly namespace the php class names in typespec

Reviewed By: aditya

Test Plan: Regenerate ubersearch code

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

17 years agoFixing typo in Thrift trunk
Mark Slee [Tue, 13 Nov 2007 05:35:34 +0000 (05:35 +0000)] 
Fixing typo in Thrift trunk

Summary: xter => xfer

Reviewed By: sgrimm

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

17 years agoThrift PHP generation Redux
Mark Slee [Tue, 13 Nov 2007 04:00:29 +0000 (04:00 +0000)] 
Thrift PHP generation Redux

Summary: Chopping the amount of code generated by Thrift for PHP services by two orders of magnitude (approx 25% of the previous size). This is done via putting more logic in a dynamic base class and taking it out of the generated code. Hopefully this wins back the CPU cycles paid just to load code from APC at the cost of a marginal increase in dynamic execution runtime.

Reviewed By: sgrimm, dreiss

Test Plan: Ran all the tests in trunk/test/php, also tested the API generate code and Falcon, etc. in my sandbox

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

17 years agoThrift: Perl HttpClient and fixes.
David Reiss [Thu, 8 Nov 2007 01:05:46 +0000 (01:05 +0000)] 
Thrift: Perl HttpClient and fixes.

Summary:
Also updated the CONTRIBUTORS file.  Sorry, Boz.

Reviewed By: mcslee

Revert Plan: ok

Other Notes:
Submitted by Igor Afanasyev.
Reviewed by Jake Luciani.

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

17 years agoDeal with UnsupportedEncodingException in TBinaryProtocol
Mark Slee [Wed, 7 Nov 2007 00:48:47 +0000 (00:48 +0000)] 
Deal with UnsupportedEncodingException in TBinaryProtocol

Summary: In case you are running on a horrendous JVM that doesn't have UTF-8 support

Reviewed By: dreiss

Test Plan: Compile.

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

17 years agoAdd include_once statements for generated PHP code that depends upon other types
Mark Slee [Tue, 6 Nov 2007 22:11:29 +0000 (22:11 +0000)] 
Add include_once statements for generated PHP code that depends upon other types

Reviewed By: root

Test Plan: Generate PHP code for a .thrift file with an include in it

Other Notes: Reviewed by Todd Lipcon from AmieStreet

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

17 years agoMissing configure check for strerror function
Mark Slee [Tue, 6 Nov 2007 22:10:24 +0000 (22:10 +0000)] 
Missing configure check for strerror function

Reviewed By: dreiss

Test Plan: Run configure script

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

17 years ago-- ensure that flush is called in close() of any wrapper transport
Aditya Agarwal [Tue, 6 Nov 2007 06:33:06 +0000 (06:33 +0000)] 
-- ensure that flush is called in close() of any wrapper transport

Summary:
- unflushed data should be flushed when transport is closed
- this diff calls flush for TBufferedTransport and TFramedTransport

Reviewed By: dreiss

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

17 years agoAdd programatic shutdown option to Java Thrift servers
Mark Slee [Sat, 3 Nov 2007 05:30:32 +0000 (05:30 +0000)] 
Add programatic shutdown option to Java Thrift servers

Summary: Same paradigm as in C++ model. Allow ServerTransport to be interrupted to block an accept loop and cleanly stop serving client requests.

Reviewed By: dreiss

Test Plan: Invoke shutdown() method on a TServer

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

17 years agoMake Java TbinaryProtocol enfore UTF-8
Mark Slee [Sat, 3 Nov 2007 04:48:43 +0000 (04:48 +0000)] 
Make Java TbinaryProtocol enfore UTF-8

Summary: Java Strings have to have an encoding, they can't just be binary. The constructor and getBytes() method enforce this, so we are standardizing on UTF-8 to avoid string-mangling.

Reviewed By: dreiss

Test Plan: Code all works the exact same in the normal case, and doesn't mangle characters beyond ASCII or ISO-LATIN-1

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

17 years ago[TMemoryBuffer: an in-memory buffer acting like a transport]
lklots [Fri, 2 Nov 2007 23:01:27 +0000 (23:01 +0000)] 
[TMemoryBuffer: an in-memory buffer acting like a transport]

Summary: This is the php equivalent of the cpp TMemoryBuffer.
         It is simply a transport that stores read and fetches write
         requests to and from a string.

Trac Bug: #

Blame Rev:

Reviewed By: dreiss

Test Plan: Tested using thrift de/serialization. Wrote thrift objeccts
           to the buffer and then read them later to resconstruct them.
           Tested exceptional cases.

Revert Plan: ok

Database Impact: none

Memcache Impact: none

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

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

17 years ago[thrift_protocol] need negative testing for default inclusion
hzhao [Fri, 2 Nov 2007 03:18:28 +0000 (03:18 +0000)] 
[thrift_protocol] need negative testing for default inclusion

Reviewed By: dweatherford
Test Plan: dev026 build

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

17 years ago[thrift] return empty string instead of NULL
dweatherford [Fri, 2 Nov 2007 02:22:25 +0000 (02:22 +0000)] 
[thrift] return empty string instead of NULL

Summary: Turns out they're different, oops
Reviewed By: marcel
Test Plan: recompile, reinstall, synapse:tablet.get() on a nonexistent cell (which returns an empty string)
Revert: ok

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

17 years agoThrift: Create directories with more permissive modes.
David Reiss [Thu, 1 Nov 2007 17:15:35 +0000 (17:15 +0000)] 
Thrift: Create directories with more permissive modes.

Summary:
How many times has no one else been able to use your awesome Python script
because the Thrift generated files are in a directory that they can't access?
Never again!  We now create directories with mode 0777.
Of course, your process umask will ensure that they are actually created
with mode 0755.  (This is how the mkdir command works.)

Reviewed By: mcslee

Test Plan:
Rebuilt thrift, then did this:
dreiss@dreiss-vmware:dir_mode:thrift/test$ rm -rf gen-*
dreiss@dreiss-vmware:dir_mode:thrift/test$ thrift -cpp  -java -php -py ThriftTest.thrift
dreiss@dreiss-vmware:dir_mode:thrift/test$ ls -ld gen-*
drwx------ 2 dreiss dreiss 4096 2007-10-18 12:20 gen-cpp
drwx------ 3 dreiss dreiss 4096 2007-10-18 12:20 gen-java
drwx------ 2 dreiss dreiss 4096 2007-10-18 12:20 gen-php
drwx------ 3 dreiss dreiss 4096 2007-10-18 12:20 gen-py
dreiss@dreiss-vmware:dir_mode:thrift/test$ rm -rf gen-*
dreiss@dreiss-vmware:dir_mode:thrift/test$ ../compiler/cpp/thrift -cpp  -java -php -py ThriftTest.thrift
dreiss@dreiss-vmware:dir_mode:thrift/test$ ls -ld gen-*
drwxr-xr-x 2 dreiss dreiss 4096 2007-10-18 12:20 gen-cpp
drwxr-xr-x 3 dreiss dreiss 4096 2007-10-18 12:20 gen-java
drwxr-xr-x 2 dreiss dreiss 4096 2007-10-18 12:20 gen-php
drwxr-xr-x 3 dreiss dreiss 4096 2007-10-18 12:20 gen-py
dreiss@dreiss-vmware:dir_mode:thrift/test$

Revert Plan: ok

Other Notes:
With some help from external contributor Ben Maurer.

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

17 years agoTHRIFT: update the thrift extension
boz [Thu, 1 Nov 2007 07:37:45 +0000 (07:37 +0000)] 
THRIFT: update the thrift extension

Summary: more ZTS stuff

Reviewed By: hzhao

Test Plan: the same tests still pass

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

17 years ago[thrift] Merge protocol/transport changes from tfb/www
dweatherford [Wed, 31 Oct 2007 23:30:56 +0000 (23:30 +0000)] 
[thrift] Merge protocol/transport changes from tfb/www

Summary: Supporting the thrift_protocol extension.
  Relevant changesets are r66531, r66700, r66708
Reviewed By: mcslee
Test Plan: same code already runs in tfb trunk, php -l
Revert: svn

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

17 years ago[thrift] erlang structs now compile
eletuchy [Wed, 31 Oct 2007 13:40:48 +0000 (13:40 +0000)] 
[thrift] erlang structs now compile

Summary: if "cond and cond ->" is not valid erlang,
         if "cond andalso cond ->" is.

Reviewed By: cpiro

Test Plan: generated erlang from and thrift file with structs ...
           generated code compiles

Revert Plan: sure

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

17 years ago[thrift] PHP generator: extension support
dweatherford [Wed, 31 Oct 2007 06:03:54 +0000 (06:03 +0000)] 
[thrift] PHP generator: extension support

Summary: Adds php code generation to take advantage of the php
  'thrift_protocol' extension (currently for deserialization only)

  Requires you to swap your protocol for a TBinaryProtocolAccelerated
  (which just inherits TBinaryProtocol without actually adding any
  new functionality) and that you use a TFramedTransport or wrap your
  transport in a TBufferedTransport.

  TBinaryProtocolAccelerated is currently only in tfb/www/lib (or will
  be momentarily).

Reviewed By: mcslee
Test Plan: synapse_feed uses this in my sandbox, works fine
Revert: svn

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

17 years ago[thrift] PHP thrift_protocol extension
dweatherford [Wed, 31 Oct 2007 04:22:12 +0000 (04:22 +0000)] 
[thrift] PHP thrift_protocol extension

Summary: Implement a deserializer for thrift integral types and containers
  in C++ for extra performance. To be combined with compiler support to
  generate code that uses the extension + TBinaryProtocolAccelerated to
  enable it.

Reviewed By: mcslee
Test Plan: runs fine in my sandbox...
Revert: svn

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

17 years ago[thrift] Output dir selection + updated TSCons
dweatherford [Wed, 31 Oct 2007 02:18:14 +0000 (02:18 +0000)] 
[thrift] Output dir selection + updated TSCons

Summary: Allows setting the output directory via the new '-o dir' cmdline option.

  TSCons is updated to use this to put the output in the right place no matter
  the cwd, so doing dependent builds from different directories won't break.

Reviewed By: martin
Test Plan: mkdir /tmp/honk; thrift -cpp -java -javabean -php -phpi -py -rb -xsd -perl -erl -ocaml -hs -cocoa -o /tmp/honk Tablet.thrift
Revert: svn

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

17 years agoFix handling of ruby write parameters due to nil vs false
Mark Slee [Tue, 30 Oct 2007 16:55:47 +0000 (16:55 +0000)] 
Fix handling of ruby write parameters due to nil vs false

Summary: Need to check for != nil, not just boolean expression

Reviewed By: mcslee

Test Plan: Send a boolean "false" value

Other Notes: Patch submitted by Patrick Collison

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