Add explicit binary type to Thrift
authorMark Slee <mcslee@apache.org>
Fri, 13 Apr 2007 01:57:12 +0000 (01:57 +0000)
committerMark Slee <mcslee@apache.org>
Fri, 13 Apr 2007 01:57:12 +0000 (01:57 +0000)
commit8d725a27385fb33bce8fe50fff77f763617b49d4
treec8c5dbcaf34b79162f38c875cf9f9558dadfc7de
parent4f261c5b23d2eb3b01da4b894a1d5eabc48f6817
Add explicit binary type to Thrift

Summary: Identical to string in all languages except Java. Java String is NOT binary-safe, so we need to use raw byte[] in that case. PHP/RUBY/Python strings are all binary safe, and C++ std::string works fine and manages memory for you so it's the safest route. Java just needs this tweak.

Reviewed By: aditya

Test Plan: Use "binary" as a type instead of String.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665099 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_java_generator.cc
compiler/cpp/src/generate/t_java_generator.h
compiler/cpp/src/globals.h
compiler/cpp/src/main.cc
compiler/cpp/src/parse/t_base_type.h
compiler/cpp/src/thriftl.ll
compiler/cpp/src/thrifty.yy
lib/java/src/protocol/TBinaryProtocol.java
lib/java/src/protocol/TProtocol.java