Thrift: Distinguish between string and binary types in C++ and Java.
authorDavid Reiss <dreiss@apache.org>
Fri, 15 Feb 2008 01:38:18 +0000 (01:38 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 15 Feb 2008 01:38:18 +0000 (01:38 +0000)
commitc005b1b65ed24bba18e843c85b9a2a281bfec265
tree94f0ec3d3776882ec3364bbfca09183798324890
parent9ff3b9d5fc823fdc0d25cb3e034b00d098ebbdda
Thrift: Distinguish between string and binary types in C++ and Java.

Summary:
The upcoming TJSONProtocol handles string and binary types quite differently.
This change makes that distinction in all parts of the C++ binding.

Java already distinguished between string and binary, but this change
also updates the Java skip method to skip over strings as binary
so we don't get encoding errors when skipping binary data.

Reviewed By: mcslee

Test Plan: make check

Revert Plan: ok

Other Notes:
I just pulled this out of Chad Walters' JSON patch.
The only other change was adding readBinary (or was it writeBinary)
to TDenseProtocol.  Maybe inheriting from TBinaryProtocol wasn't a good idea.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665481 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_cpp_generator.cc
lib/cpp/src/protocol/TBinaryProtocol.cpp
lib/cpp/src/protocol/TBinaryProtocol.h
lib/cpp/src/protocol/TDebugProtocol.cpp
lib/cpp/src/protocol/TDebugProtocol.h
lib/cpp/src/protocol/TDenseProtocol.cpp
lib/cpp/src/protocol/TDenseProtocol.h
lib/cpp/src/protocol/TOneWayProtocol.h
lib/cpp/src/protocol/TProtocol.h
lib/java/src/protocol/TProtocolUtil.java