Commit Graph

1061 Commits

Author SHA1 Message Date
Marc Slemko
85ca7a13e8 Added ax_event_base.m4 to find and configure libevent
Modified configure.ac to pull in AX_EVENT_BASE
Modified Makefile.am to take EVENT settings from automake.

Reviewed by dcorson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664919 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 08:32:16 +00:00
Marc Slemko
75c2f702c9 Make boost base default to yes to make sure we don't get through configure without boost
Fixed configure.ac to add a few missing functions and headers

Reviewed by dcorson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664918 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 07:59:38 +00:00
Mark Slee
5ec19933cb Resolve complex typedefs in Thrift
Summary: For function returns

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664917 13f79535-47bb-0310-9956-ffa450edef68
2007-01-16 23:53:53 +00:00
Mark Slee
a340e0d6fe Thrift should generate C++ enums first before typdefs
Summary: In case you want to typedef an enum

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664916 13f79535-47bb-0310-9956-ffa450edef68
2007-01-16 23:00:31 +00:00
Mark Slee
406a40cf16 Prefix generated _args and _result helper classes with service name
Summary: To avoid conflicts when you have two services with the same name inside one .thrift file

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664915 13f79535-47bb-0310-9956-ffa450edef68
2007-01-16 22:48:22 +00:00
Marc Slemko
d95abdd918 Added autoconf/automake glue to run lib/py/setup.py as part of make install
Reviewed by mslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664914 13f79535-47bb-0310-9956-ffa450edef68
2007-01-16 22:20:19 +00:00
robert
b0fac3ee66 Fixed some warnings, changed TSocketPool to inherit debugHandler from TSocket
reviewed: mcslee
revert: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664913 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 23:53:25 +00:00
Aditya Agarwal
ebc99e0e16 -- Allow manual setting of host and port in TSocket
Summary:
-- required for TSocketPool equivalent functionality

Reviewed By: slee

Notes:
-- Todo is to replicate TSocketPool.php in C++


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664912 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 23:14:58 +00:00
robert
1c989f2c78 Added open, close, and isOpen to TFramedTransport
reviewed: mcslee
revert: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664911 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 18:29:51 +00:00
Mark Slee
a45909b619 Thrift C++ code generator returns complex types by reference
Summary: Efficiency, Yo.

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664910 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 21:44:14 +00:00
Mark Slee
529bfeef97 Committing code gen changes for const ref args to functions in Thrift
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664909 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 02:10:16 +00:00
Mark Slee
e888b376ad Add PHP namespacing support to Thrift
Summary: "php_namespace Whoa" at the top of your Thrift file, then all your defined class names start with "Whoa_"

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664908 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 01:06:24 +00:00
Mark Slee
f12865a338 Disallow keywords in Thrift files
Summary: Or else you are bound to get shitty errors in some generated languages.. They're not all covered here, but a lot of them are.

Reviewed By: dougb, bobby


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664907 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 00:23:26 +00:00
Adam Nichols
2f816f28e6 minor syntax change in thrift php library, reviewed by slee, revertible
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664906 13f79535-47bb-0310-9956-ffa450edef68
2007-01-11 21:25:29 +00:00
Mark Slee
e7714a6c09 Fix call_user_func bug on debugHandler_
Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664905 13f79535-47bb-0310-9956-ffa450edef68
2007-01-11 01:26:00 +00:00
Mark Slee
a4713ea566 Example syntax for constants in Thrift
Reviewed By: martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664904 13f79535-47bb-0310-9956-ffa450edef68
2007-01-05 01:09:04 +00:00
Mark Slee
ad58f952bc Add options to thrift transport classes for custom error handlers
Summary: So we can pass debug_rlog (facebook custom) in as a handler for errors to thrift (generic open source)

Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664903 13f79535-47bb-0310-9956-ffa450edef68
2007-01-03 19:23:50 +00:00
Mark Slee
a09e34efb0 Fix typo class variable bug in TSocketPool
Reviewed By: corson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664902 13f79535-47bb-0310-9956-ffa450edef68
2007-01-03 18:45:04 +00:00
putnam
fde62cb223 Fixed typo in Thrift README
Summary:
  locacation? COME ON GUYS.

Review:
  peter

Test plan:
  I read it, then re-read it, then re-re-read it.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664901 13f79535-47bb-0310-9956-ffa450edef68
2006-12-22 10:35:12 +00:00
robert
79511192f1 fixed a problem with read buffer resizing in TNonblockingServer
reviewed: mcslee
revert: yes
test: send a large message to a nonblocking server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664900 13f79535-47bb-0310-9956-ffa450edef68
2006-12-20 19:25:38 +00:00
robert
3fa9d24bc3 fixed a bug in TFramedTransport where it was checking a size for nonzero after byte swapping it.
reviewed: mcslee
revert: yes
test: run a C++ client and server with framed transport


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664899 13f79535-47bb-0310-9956-ffa450edef68
2006-12-19 22:27:54 +00:00
Mark Slee
2abc9dfd59 message_ in TException can't be const or subclasses break
Reviewed By: yishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664898 13f79535-47bb-0310-9956-ffa450edef68
2006-12-16 01:06:49 +00:00
Mark Slee
706da40237 Fix exceptions throw() and virtual destructor
Reviewed By: yishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664897 13f79535-47bb-0310-9956-ffa450edef68
2006-12-16 00:59:29 +00:00
Mark Slee
971fda34b5 All user-defined thrift exceptions inherit from TException
Summary: So you can catch more effectively

Reviewed By: tbr-karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664896 13f79535-47bb-0310-9956-ffa450edef68
2006-12-15 19:07:04 +00:00
Mark Slee
0524bcee68 Another AccessNull bug fix in Thrift
Reviewed By: yhishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664895 13f79535-47bb-0310-9956-ffa450edef68
2006-12-13 01:54:56 +00:00
Mark Slee
069d31e7b9 Fix c++ Null inheritance issue
Reviewed By: yishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664894 13f79535-47bb-0310-9956-ffa450edef68
2006-12-13 01:45:26 +00:00
Mark Slee
cbea1c7ef3 Take out timestamps from generated files
Summary: File system does this for you.

Reviewed By: martin, yishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664893 13f79535-47bb-0310-9956-ffa450edef68
2006-12-13 01:07:33 +00:00
Martin Kraemer
8196a61745 Thrift TException Cleanup
Summary:
Destructors should be virtual or declared protected.

Reviewed By: mcslee

Revert Plan: revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664892 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 01:57:58 +00:00
Aditya Agarwal
25b293616b -- Rename TBufferedFileWriter.h/cpp to TFileTransport.h/cpp
Summary:
-- Thrift logfile is now officially in action!

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664891 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:58:15 +00:00
Aditya Agarwal
0c341a1332 -- Check all system call return values
Summary:
-- Throw TTransportException if a system call fails

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664890 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:47:03 +00:00
Aditya Agarwal
e9ef8d7ce9 -- TFileTransport (Thrift Logfile)
Summary:
-- TBufferedFileWriter.h/cpp will be renamed to TFileTransport.h/cpp in the next commit.
-- TFileTransport is essentially reading and writing thrift calls to/from a file instead of a
   socket.
-- The code/design is somewhat similar to pillar_logfile but there are some significant changes.

todo:
-- still need to do error correction/detection

Reviewed By: Mark Slee

Test Plan:
-- Wrote test in thrift/test/cpp/src/main.cpp that appends to a file and replays requests

Notes:
It's finally time to port search over to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664889 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 23:52:57 +00:00
Mark Slee
962a858566 Generate a null implementation of thrift C++ class for easy subclassing
Summary: Sometimes you just want a subclass that only implements one method... annoying to fill in nulls for the others, so use the generated null class

Reviewed By: tbr-aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664888 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 19:15:35 +00:00
Martin Kraemer
97f9d60be8 Thrift TException does not properly define virtual what() method.
Summary:
Clients would elect to call the base class what() method instead of the derived version.  This results in
less than usable exceptions for debugging.

Reviewed By: Karl * mcslee

Test Plan:
Tested with local application in development.

Revert Plan:
revertible.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664887 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 19:52:16 +00:00
Mark Slee
3860c9a246 Fix TSimpleServer exception bug
Reviewed By: tbr-martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664886 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 00:13:42 +00:00
Mark Slee
807b2c601d Missing file in thrift parser, sorry d00dz!
Summary: Forgot to svn add


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664885 13f79535-47bb-0310-9956-ffa450edef68
2006-11-30 00:55:41 +00:00
Mark Slee
7657fa9747 Oops take out printf debug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664884 13f79535-47bb-0310-9956-ffa450edef68
2006-11-29 22:07:23 +00:00
Mark Slee
600cdb337e Thrift supports HEX notation for int consts and proper python/php sets
Reviewed By: yishan-tbr


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664883 13f79535-47bb-0310-9956-ffa450edef68
2006-11-29 22:06:42 +00:00
Mark Slee
67fc63410d Strings in JSON style thrift constants do not need quotes
Summary: Cause it's just too much work to put in quotes sometimes. struct thing = { a : 325, bb : 5632} OBVIOUSLY a and bb are strings. Duh.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664882 13f79535-47bb-0310-9956-ffa450edef68
2006-11-29 03:37:04 +00:00
Mark Slee
aa7671d041 Thrift supports arbitrarily typed constants across all languages
Summary: Hot! Now you can defined your maps to strings and other constnats things in your .thrift file, so you can have the same symbols and useful defaults defined in your client as in your server.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664881 13f79535-47bb-0310-9956-ffa450edef68
2006-11-29 03:19:31 +00:00
Mark Slee
301528702c Thrift compiler frontend support for constants
Summary: The parser now accepts constants and adds them into the parse tree


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664880 13f79535-47bb-0310-9956-ffa450edef68
2006-11-28 01:24:07 +00:00
Mark Slee
d3bc1a5f52 Fix _seqid to seqid_ name change in PHP
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664879 13f79535-47bb-0310-9956-ffa450edef68
2006-11-27 20:25:43 +00:00
Mark Slee
e598d075f5 Thrift: Fix PHP socket fread return
Summary: If you read the string "0" then it treats that as false, so we have to check for both === false and === '' manually.

Reviewed By: martin

Notes: I hate php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664878 13f79535-47bb-0310-9956-ffa450edef68
2006-11-21 02:01:22 +00:00
Mark Slee
216e7d6a9a Fix thrift compiler typedef support
Summary: Typedefed containers were wonk'd

Reviewed By: martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664877 13f79535-47bb-0310-9956-ffa450edef68
2006-11-21 00:44:23 +00:00
Mark Slee
b9ff32ae30 Thrift: C++ peek() method and TException not Exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664876 13f79535-47bb-0310-9956-ffa450edef68
2006-11-16 01:00:24 +00:00
Mark Slee
588e452bc4 Fix bad implode call with nonexistant class variable in PHP SocketPool
Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664875 13f79535-47bb-0310-9956-ffa450edef68
2006-11-15 22:23:06 +00:00
Mark Slee
04cc605597 Comma after ENUM with no explicit value
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664874 13f79535-47bb-0310-9956-ffa450edef68
2006-11-15 21:25:34 +00:00
Mark Slee
6e81b3fb5c Rest definition should not implement interface, the method signatures are different.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664873 13f79535-47bb-0310-9956-ffa450edef68
2006-11-14 23:51:27 +00:00
Mark Slee
5ea94d444b Thrift generates a REST handler for PHP code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664872 13f79535-47bb-0310-9956-ffa450edef68
2006-11-14 23:48:00 +00:00
Mark Slee
19e71c34b1 All thrift PHP class constructors can take an array as the constructor argument
Summary: It will init any field with the value in the array. Hot for converting DB rows into thrift objs.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664871 13f79535-47bb-0310-9956-ffa450edef68
2006-11-10 23:07:35 +00:00
Mark Slee
52cb2234de I lied before, now thrift really supports single or double dashes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664870 13f79535-47bb-0310-9956-ffa450edef68
2006-11-10 22:32:07 +00:00