THRIFT-248. ruby: Factor BinaryProtocolAccelerated into separate protocol and struct...
authorBryan Duxbury <bryanduxbury@apache.org>
Mon, 2 Feb 2009 00:48:17 +0000 (00:48 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Mon, 2 Feb 2009 00:48:17 +0000 (00:48 +0000)
commitc016628a8a05aecefb3718e74a04a6e59882d537
tree6c7db6eeb00678ffcbf93056c77f4ee41479b091
parent056bcb69477a12381bdb007debf55e654c1be257
THRIFT-248. ruby: Factor BinaryProtocolAccelerated into separate protocol and struct components

This patch replaces the "binaryprotocolaccelerated" c extension with the "thrift_native" c extension. This new extension creates native implementations for the struct.rb #write and #read methods, Thrift::BinaryProtocol, and Thrift::MemoryBuffer, but keeps ruby-level interfaces, allowing all protocols to benefit from the struct code and the memory buffer. There is however an additional cost associated with going through this ruby layer, but the increased interoperability seems to be well worth it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739895 13f79535-47bb-0310-9956-ffa450edef68
24 files changed:
lib/rb/Manifest
lib/rb/ext/binary_protocol_accelerated.c [new file with mode: 0644]
lib/rb/ext/binary_protocol_accelerated.h [new file with mode: 0644]
lib/rb/ext/binaryprotocolaccelerated.c [deleted file]
lib/rb/ext/constants.h [new file with mode: 0644]
lib/rb/ext/extconf.rb
lib/rb/ext/memory_buffer.c [new file with mode: 0644]
lib/rb/ext/memory_buffer.h [new file with mode: 0644]
lib/rb/ext/protocol.c [new file with mode: 0644]
lib/rb/ext/protocol.h [new file with mode: 0644]
lib/rb/ext/struct.c [new file with mode: 0644]
lib/rb/ext/struct.h [new file with mode: 0644]
lib/rb/ext/thrift_native.c [new file with mode: 0644]
lib/rb/lib/thrift/protocol.rb
lib/rb/lib/thrift/protocol/binaryprotocol.rb
lib/rb/lib/thrift/protocol/binaryprotocolaccelerated.rb
lib/rb/lib/thrift/struct.rb
lib/rb/lib/thrift/thrift.rb
lib/rb/spec/binaryprotocol_spec_shared.rb
lib/rb/spec/binaryprotocolaccelerated_spec.rb
lib/rb/spec/protocol_spec.rb
lib/rb/spec/serializer_spec.rb
lib/rb/spec/spec_helper.rb
lib/rb/spec/struct_spec.rb