Commit Graph

670 Commits

Author SHA1 Message Date
David Reiss
bef54c0647 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
2007-11-28 20:15:11 +00:00
Mark Slee
b16074d53b 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
2007-11-28 05:54:33 +00:00
Mark Slee
d0f5b28835 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
2007-11-28 04:29:25 +00:00
Mark Slee
e02ab33cb8 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
2007-11-28 04:17:49 +00:00
Mark Slee
645ecea714 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
2007-11-28 02:46:24 +00:00
Mark Slee
d602f822d5 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
2007-11-28 02:45:13 +00:00
Mark Slee
b22df7c963 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
2007-11-28 02:39:59 +00:00
Mark Slee
b4d3e7b052 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
2007-11-28 01:51:43 +00:00
Mark Slee
b455292699 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
2007-11-28 00:12:11 +00:00
Mark Slee
fe6ed0dff4 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
2007-11-27 21:54:38 +00:00
Mark Slee
256bdc4448 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
2007-11-27 08:42:19 +00:00
Mark Slee
844ac12489 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
2007-11-27 08:38:52 +00:00
Mark Slee
5ab570558f 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
2007-11-27 08:38:16 +00:00
Mark Slee
53d9c0c20b 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
2007-11-26 21:15:40 +00:00
Mark Slee
79b1694043 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
2007-11-26 19:05:29 +00:00
Mark Slee
7962223ce2 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
2007-11-21 23:35:52 +00:00
Mark Slee
a9387af56e 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
2007-11-21 22:05:50 +00:00
Mark Slee
bd5882259d 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
2007-11-21 08:43:35 +00:00
Mark Slee
12a28758a6 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
2007-11-20 23:55:33 +00:00
Mark Slee
8067485595 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
2007-11-20 05:54:13 +00:00
Mark Slee
efd37f14d2 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
2007-11-20 05:13:09 +00:00
Mark Slee
a1d4cab45f 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
2007-11-20 04:58:16 +00:00
Mark Slee
276eea68b7 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
2007-11-20 02:06:47 +00:00
Mark Slee
12a3b4e002 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
2007-11-20 02:05:29 +00:00
Mark Slee
8440605c27 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
2007-11-20 01:39:25 +00:00
Mark Slee
fb4b514028 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
2007-11-20 01:27:08 +00:00
hzhao
b6014f494f 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
2007-11-18 20:54:30 +00:00
hzhao
7fcc9e87ba 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
2007-11-18 20:48:56 +00:00
Christopher Piro
de11d85211 [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
2007-11-18 02:10:20 +00:00
Mark Slee
09f69e0524 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
2007-11-17 00:32:36 +00:00
Mark Slee
f5a6b0c109 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
2007-11-17 00:27:17 +00:00
dweatherford
611434992a [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
2007-11-16 03:29:47 +00:00
Mark Slee
eab6ac8b18 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
2007-11-16 03:27:22 +00:00
Mark Slee
9e58f4330d 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
2007-11-16 02:48:52 +00:00
Christopher Piro
9230539a6f [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
2007-11-15 06:26:32 +00:00
Christopher Piro
10522a7f2b [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
2007-11-15 06:26:31 +00:00
Christopher Piro
c2e37c7a61 [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
2007-11-15 06:26:30 +00:00
Christopher Piro
90eab4d6e4 [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
2007-11-15 06:26:29 +00:00
Christopher Piro
2605af3a2d [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
2007-11-15 06:26:29 +00:00
Christopher Piro
53b6ef670c [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
2007-11-15 06:26:28 +00:00
Christopher Piro
a1650fe55c [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
2007-11-15 06:26:27 +00:00
Christopher Piro
3121c8271f [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
2007-11-15 06:26:26 +00:00
Christopher Piro
0d5cd8a6b9 [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
2007-11-15 02:20:59 +00:00
Christopher Piro
6c74062262 [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
2007-11-15 02:20:58 +00:00
Mark Slee
89d5207983 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
2007-11-14 00:24:14 +00:00
David Reiss
465ccc0924 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
2007-11-13 21:41:29 +00:00
David Reiss
380298f458 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
2007-11-13 11:55:06 +00:00
Mark Slee
0cdc6c8cd9 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
2007-11-13 10:19:08 +00:00
Mark Slee
c557df42ed 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
2007-11-13 05:53:44 +00:00
Mark Slee
2b786221ed 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
2007-11-13 05:35:34 +00:00