Thrift: Native-code Binary Protocol encoder.
authorDavid Reiss <dreiss@apache.org>
Sat, 25 Aug 2007 18:01:30 +0000 (18:01 +0000)
committerDavid Reiss <dreiss@apache.org>
Sat, 25 Aug 2007 18:01:30 +0000 (18:01 +0000)
commit382fc3043cba33fea1a919e4e6bfeac0cb9c22aa
tree25fbc629b633f81f618842d86c4f0f6c44c83a12
parent40c6ac574c0090900736da744ef8cb72340b6c07
Thrift: Native-code Binary Protocol encoder.

Summary:
Merging a patch from Ben Maurer.
This adds a python extension (i.e., a C module) that
encodes Python thrift structs into the standard binary protocol
much faster than our generated Python code.

Also added by-value equality comparison to thrift structs
(to help with testing).

Cleaned up some trailing whitespace too.

Reviewed By: mcslee, dreiss

Test Plan:
Recompiled Thrift.
Thrifted a bunch of IDLs and compared the generated Python output.
Looked at the extension module a lot.
test/FastBinaryTest.py

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665224 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_py_generator.cc
compiler/cpp/src/generate/t_py_generator.h
lib/py/setup.py
lib/py/src/protocol/TBinaryProtocol.py
lib/py/src/protocol/__init__.py
lib/py/src/protocol/fastbinary.c [new file with mode: 0644]
lib/py/src/transport/TTransport.py
test/DebugProtoTest.thrift
test/FastbinaryTest.py [new file with mode: 0755]