Summary: we need to use a shared_ptr instead of an old fashioned one if we're
going to stick with this PIMPL model
Reviewed By: dreiss, marc
Test Plan: test program didn't fail or leak memory, foreman (fb303 client)
worked without problem
Revert Plan: just make sure you find some other solution to this problem
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665280 13f79535-47bb-0310-9956-ffa450edef68
Summary: also added myself to CONTRIBUTORS.
Reviewed By: marc
Test Plan: the following program no longer leaks memory (valgrind):
int main(int argc, char **argv){
Mutex mu;
mu.lock();
mu.unlock();
}
Revert Plan: ok
Notes: this is kind of important
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665279 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- make dist is no fun. Had to add a lot of stuff to Makefile.am to
make sure stuff got included in the tarball.
- Added a permanent NEWS file with the release notes for this release.
- clean.sh removes ylwrap also.
- Gave it a real version for make dist.
- Added ACLOCAL_AMFLAGS to lib/cpp/Makefile.am to make it easier to
work on configure.ac.
- Made concurrency_test a non-installed binary because
no one wants to install it.
- Dropped some symlinks that were annoying make dist.
- Updated README.
Test Plan:
./bootstrap.sh && ./configure && make dist
Compared contents of tarball to source tree.
Did this from a fresh git tree so no gross untracked files would be around.
On devrs: ./bootstrap.sh && ./configure && make install DESTDIR=/tmp/relinst1
Made sure concurrency_test was built but not installed.
Checked zlib URL with firefox.
Reviewed By: mcslee
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665274 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* got rid of most of the otp_base jonx ... save that for a future release unfortunately
* cleaned up the tutorial server, added -erl to tutorial.thrift's shebang
* made better README and TODO
Test Plan: checked out a copy, read my directions, built and ran the tutorial, and pretended that it didn't blow
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665273 13f79535-47bb-0310-9956-ffa450edef68
Summary: Before they were names Service.erl, but the Service module name should be reserved for more important things. Namespaces what?
Test Plan: with channel server
Riders: also fixes whitespace, puts -erl in its right place
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665271 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Same as the last (reverted) zlib patch,
but this time with way more awesome support for building
with no zlib headers installed.
Reviewed By: mcslee
Test Plan:
- Did lots of really pathological stuff in my VMware.
- On devrs004:
./bootstrap.sh && ./configure && make && make install DESTDIR=/tmp/tzinst && echo "Yay"
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665269 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Fingerprints were'nt being initialized properly because I forgot to move
the initialization from t_struct to t_type. Fixed that.
Also, typedefs weren't generating fingerprints for their true types.
Reviewed By: mcslee
Test Plan:
This didn't work before with -cpp -dense. Now it does.
typedef list<i32> ilist
struct foo { 1: ilist l }
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665268 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- Totally re-did the libevent check.
- Thrift now compiles and instals cleanly without libevent.
- (libevent is still needed to build libthriftnb.)
Reviewed By: mcslee
Test Plan:
- Ran configure and make in various configurations in my VMware.
- Clean build and install of Thrift on devrs004 (into /tmp).
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665267 13f79535-47bb-0310-9956-ffa450edef68
Summary: Rather than an uncaught exception dropping the connection, catching std::exception (and anything derived from it) and passing its message payload back in the form of a T_EXCEPTION message is a much cleaner response.
Reviewed By: mcslee
Test Plan: compile generated code for Synapse's tablet interface, throw a generic exception at the server, observe the message for the exception arising from the client in the form of a TApplicationException (instead of the previous 'no more data to read' exception)
Revert: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665264 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Add a new transport to the C++ library: TZLibTransport.
This wraps another transport (just like TBufferedTransport),
compresses the data written to it, and uncompresses the data it reads.
Reviewed By: mcslee
Test Plan:
For ax_lib_zlib.m4
- Ran ./bootstrap.sh.
- Looked at configure.
- Ran ./configure.
- Looked at config.status
- Ran ./configure --with-zlib=/usr.
- Looked at config.status
- Changed configure.ac to AC_LIB_ZLIB(1.2.4)
- Ran ./configure.
- Watched it fail.
For TZlibTransport
- test/ZlibTest.cpp
- Code coverage (hotness) report sent with review.
- 100% line coverage for all the good stuff.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665262 13f79535-47bb-0310-9956-ffa450edef68
Summary: When flush is called this also should be
Reviewed By: aditya
Test Plan: Use w/ PipedTransport. Should writeEnd() when an exception is thrown
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665261 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Add recognition of the new Thrift keyword cocoa_prefix to
thrift.vim and thrift.el.
Reviewed By: mcslee
Test Plan: We don't need no stinkin' test plans!
Revert Plan: ok
Other Notes:
AWESOMESAUCE! Thrift now supports namespaces, packages, prefixes, and modules.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665258 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- TDenseProtocol now includes a part of the struct fingerprint in
the serialized message, to protect from unserialzing trash.
- A lot of cleanups and commenting for TDenseProtocol.
- A lot of test cases for same.
Reviewed By: mcslee
Test Plan: test/DenseProtoTest.cpp
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665257 13f79535-47bb-0310-9956-ffa450edef68
Reviewed By: dreiss
Test Plan: Generate Java code from .thrift file w/ javadoc comments
Revert: OK
Notes: My first backend diffcamp review
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665256 13f79535-47bb-0310-9956-ffa450edef68
Summary: Thanks to Andrew McGeachie for doing this
Reviewed By: dreiss
Test Plan: No merge/build issues. Will solicit McGeachie for additions to test/cocoa in the future
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665254 13f79535-47bb-0310-9956-ffa450edef68
Reviewed By: mcslee
Test Plan:
test/DenseProtoTest.cpp
Still have to test:
- Bounds checking.
- borrow/consume on TBuffered and TFramed.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665252 13f79535-47bb-0310-9956-ffa450edef68
Summary:
To support the upcoming variable-length encoding of integers in
TDenseProtocol, augment Thrift transports with two new methods:
borrow and consume. Borrow copies some data out of the transport
without consuming it, and consume... consumes it.
Reviewed By: mcslee
Test Plan:
Thrift compiles.
Should check in variable-length integer code for TDenseProtocol
right after this (git ruulz).
Revert Plan: revert stuff that uses these methods also.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665251 13f79535-47bb-0310-9956-ffa450edef68
Summary:
The Python version of TBufferedTransport now uses input buffering.
It is also compatible with the fasbinary module.
Reviewed By: mcslee
Test Plan:
test/FastbinaryTest.py
dreiss@dreiss-vmware:~/gp/thrift/test/py$ strace -f ./TestClient.py 2>&1 | grep recv | wc -l
99
# Install new version in other terminal
dreiss@dreiss-vmware:~/gp/thrift/test/py$ strace -f ./TestClient.py 2>&1 | grep recv | wc -l
14
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665250 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Added the configure script variable PY_PREFIX which serves the same purpose
for Python as --prefix does for C/C++. We chose to do this because Python
has different conventions for where to install libraries.
Reviewed By: mcslee
Test Plan:
Full clean builds and installs of Thrift from the Thrift root,
with and without PY_PREFIX. Watched output of make install.
Ran configure from lib/py without PY_PREFIX, with PY_PREFIX and with
PY_PREFIX in the environment. Checked config.status for each.
Revert Plan: okay
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665248 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- Made some stuff in TBinaryProtocol protected instead of private.
- Added a preliminary version of TDenseProtocol. This is still
super highly experimental and gross, and I wrote a super scary
comment to explain that to anyone foolish enough to try to use
this in its current state.
Reviewed By: mcslee
Test Plan: test/DenseProtoTest.cpp
Revert Plan: ok
Memcache Impact:
Save memory if/when people use it.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665247 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Local reflection typespecs for structs now have a dummy T_STOP field at the end
so we don't have to check the size on every iteration.
They also contain information about which fields are optional.
Also put a static pointer to the reflection in each structure.
Reviewed By: mcslee
Test Plan: test/DenseLinkingTest.thrift
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665246 13f79535-47bb-0310-9956-ffa450edef68
Also, checking in changes to the php generation code I made awhile ago, but forgot to check in
Reviewed By: aditya, mcslee
Test Plan: Compiled thrift and falcon, and confirmed that falcon's print binary still worked
Revert Plan: revertible
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665245 13f79535-47bb-0310-9956-ffa450edef68
Summary: Making Isset inner classes static because they don't need to reference their owner, and killing some unused variables.
Reviewed By: dreiss
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665244 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- this was causing some bizarre issues with seeking to a particular point in the log
- I can't believe we haven't run into this before
Reviewed By: jwang
Test Plan: replayed log file from a partiicular point
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665242 13f79535-47bb-0310-9956-ffa450edef68
Summary:
The compiler now takes a "-dense" flag that will cause it to
generate some extra metadata for C++. This metadata will be used by
TDenseProtocol. This should be the last compiler change necessary
to enable that feature.
Reviewed By: mcslee
Test Plan: test/DenseLinkingTest.thrift
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665240 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Small git error. These changes should have gone in my last commit.
Reviewed By: mcslee
Test Plan: Same as the last one.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665238 13f79535-47bb-0310-9956-ffa450edef68
Summary:
This is going to be needed to support TDenseProtocol.
Reviewed By: mcslee
Test Plan:
Clean build of Thrift.
Ran if/regen.sh. No change to generated C++ or Python.
gdb thrift -cpp ThriftTest.thrift. Made sure they were being generated.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665237 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- Wrap import of fastbinary in a try/catch, setting it to None if it fails.
- Don't try to fastbinary.encode/decode if fastbinary is None.
- Always generate thrift_spec, even if it is None.
- Don't try to fastbinary.encode/decode if thrift_spec is None.
Reviewed By: mcslee
Test Plan:
test/py/Test{Client,Server}.py
Manually delete my fastbinary.so, they worked fine.
Changed them to use Accelerated protocol. They still worked fine because
the test falls through to the normal generated code.
Installed fastbinary.so, everything worked fine (eventually).
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665236 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- Give reflection_limited a nice clean Python module.
- if/regen.sh now generates reflection_limited for Python and copies it to src.
- Added the generated Python for reflection_limited to version control.
- lib/py/setup.py installs reflection_limited.
- lib/py/cleanup.sh now removes build (make sure to run as root).
- The C++ version of reflection_limited was also updated by regen.sh.
Reviewed By: mcslee
Test Plan:
- Clean build and install.
- Look at the installed Python files.
- python -c 'from thrift.reflection.limited.ttypes import *'
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665235 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Previously, Thrift used the name of the .thrift file as the python module name.
This wasn't very flexible. Now the python module can be explicitly declared.
Also, there was no need for t_py_generator to inherit from t_oop_generator.
Reviewed By: mcslee
Test Plan:
cd test/py/explicit_module
./runtest.sh
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665234 13f79535-47bb-0310-9956-ffa450edef68
Summary:
It seems like the Python convention is that random janky libraries
are installed in /usr/lib/pythonX.Y/site-packages. This patch follows
that convention, even though it is pretty gross to ignore --prefix.
Reviewed By: mcslee
Test Plan: make install thrift python libs on my box.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665233 13f79535-47bb-0310-9956-ffa450edef68