From thrift-commits-return-1285yfarmer@example.org Sat May 01 13:46:33 2010 Return-Path: <thrift-commits-return-1285yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 32150 invoked from network); 1 May 2010 13:46:33 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 May 2010 13:46:33 -0000 Received: (qmail 53836 invoked by uid 500); 1 May 2010 13:46:32 -0000 Delivered-To: yfarmer@example.org Received: (qmail 53783 invoked by uid 500); 1 May 2010 13:46:32 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 53776 invoked by uid 99); 1 May 2010 13:46:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 May 2010 13:46:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 May 2010 13:46:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A4F2A23888E3; Sat, 1 May 2010 13:45:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940013 - in /incubator/thrift/trunk/lib/java: src/org/apache/thrift/ src/org/apache/thrift/protocol/ test/org/apache/thrift/ Date: Sat, 01 May 2010 13:45:38 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bryanduxbury Date: Sat May 1 13:45:38 2010 New Revision: 940013 URL: http://svn.apache.org/viewvc?rev=940013&view=rev Log: THRIFT-765. java: Revert the changes applied by THRIFT-765, as they appear to be unstable Removed: incubator/thrift/trunk/lib/java/src/org/apache/thrift/Utf8Helper.java incubator/thrift/trunk/lib/java/test/org/apache/thrift/BenchStringEncoding.java incubator/thrift/trunk/lib/java/test/org/apache/thrift/TestUtf8Helper.java Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java?rev=940013&r1=940012&r2=940013&view=diff ============================================================================== --- incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java (original) +++ incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java Sat May 1 13:45:38 2010 @@ -19,8 +19,9 @@ package org.apache.thrift.protocol; +import java.io.UnsupportedEncodingException; + import org.apache.thrift.TException; -import org.apache.thrift.Utf8Helper; import org.apache.thrift.transport.TTransport; /** @@ -179,9 +180,13 @@ public class TBinaryProtocol extends TPr } public void writeString(String str) throws TException { - byte[] dat = Utf8Helper.encode(str); - writeI32(dat.length); - trans_.write(dat, 0, dat.length); + try { + byte[] dat = str.getBytes("UTF-8"); + writeI32(dat.length); + trans_.write(dat, 0, dat.length); + } catch (UnsupportedEncodingException uex) { + throw new TException("JVM DOES NOT SUPPORT UTF-8"); + } } public void writeBinary(byte[] bin) throws TException { @@ -328,20 +333,27 @@ public class TBinaryProtocol extends TPr int size = readI32(); if (trans_.getBytesRemainingInBuffer() >= size) { - char[] charBuf = new char[size]; - int charsDecoded = Utf8Helper.decode(trans_.getBuffer(), trans_.getBufferPosition(), size, charBuf); - trans_.consumeBuffer(size); - return new String(charBuf, 0, charsDecoded); + try { + String s = new String(trans_.getBuffer(), trans_.getBufferPosition(), size, "UTF-8"); + trans_.consumeBuffer(size); + return s; + } catch (UnsupportedEncodingException e) { + throw new TException("JVM DOES NOT SUPPORT UTF-8"); + } } return readStringBody(size); } public String readStringBody(int size) throws TException { - checkReadLength(size); - byte[] buf = new byte[size]; - trans_.readAll(buf, 0, size); - return Utf8Helper.decode(buf); + try { + checkReadLength(size); + byte[] buf = new byte[size]; + trans_.readAll(buf, 0, size); + return new String(buf, "UTF-8"); + } catch (UnsupportedEncodingException uex) { + throw new TException("JVM DOES NOT SUPPORT UTF-8"); + } } public byte[] readBinary() throws TException { Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java?rev=940013&r1=940012&r2=940013&view=diff ============================================================================== --- incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java (original) +++ incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java Sat May 1 13:45:38 2010 @@ -20,9 +20,10 @@ package org.apache.thrift.protocol; +import java.io.UnsupportedEncodingException; + import org.apache.thrift.ShortStack; import org.apache.thrift.TException; -import org.apache.thrift.Utf8Helper; import org.apache.thrift.transport.TTransport; /** @@ -292,7 +293,11 @@ public final class TCompactProtocol exte * Write a string to the wire with a varint size preceeding. */ public void writeString(String str) throws TException { - writeBinary(Utf8Helper.encode(str)); + try { + writeBinary(str.getBytes("UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new TException("UTF-8 not supported!"); + } } /** @@ -605,13 +610,16 @@ public final class TCompactProtocol exte return ""; } - if (trans_.getBytesRemainingInBuffer() >= length) { - char[] charBuf = new char[length]; - int charsDecoded = Utf8Helper.decode(trans_.getBuffer(), trans_.getBufferPosition(), length, charBuf); - trans_.consumeBuffer(length); - return new String(charBuf, 0, charsDecoded); - } else { - return Utf8Helper.decode(readBinary(length)); + try { + if (trans_.getBytesRemainingInBuffer() >= length) { + String str = new String(trans_.getBuffer(), trans_.getBufferPosition(), length, "UTF-8"); + trans_.consumeBuffer(length); + return str; + } else { + return new String(readBinary(length), "UTF-8"); + } + } catch (UnsupportedEncodingException e) { + throw new TException("UTF-8 not supported!"); } } From thrift-commits-return-1286yfarmer@example.org Sat May 01 13:48:59 2010 Return-Path: <thrift-commits-return-1286yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 32694 invoked from network); 1 May 2010 13:48:59 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 May 2010 13:48:59 -0000 Received: (qmail 55525 invoked by uid 500); 1 May 2010 13:48:59 -0000 Delivered-To: yfarmer@example.org Received: (qmail 55506 invoked by uid 500); 1 May 2010 13:48:59 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 55499 invoked by uid 99); 1 May 2010 13:48:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 May 2010 13:48:58 +0000 X-ASF-Spam-Status: No, hits=-1853.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 May 2010 13:48:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3B35F23889B9; Sat, 1 May 2010 13:48:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940016 - in /incubator/thrift/tags/0.3.0/lib/java: src/org/apache/thrift/Utf8Helper.java src/org/apache/thrift/protocol/TBinaryProtocol.java src/org/apache/thrift/protocol/TCompactProtocol.java test/org/apache/thrift/TestUtf8Helper.java Date: Sat, 01 May 2010 13:48:08 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Sat May 1 13:48:07 2010 New Revision: 940016 URL: http://svn.apache.org/viewvc?rev=940016&view=rev Log: THRIFT-765. java: Roll back the changes in THRIFT-765, as they appear to be unstable Removed: incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/Utf8Helper.java incubator/thrift/tags/0.3.0/lib/java/test/org/apache/thrift/TestUtf8Helper.java Modified: incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java Modified: incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java URL: http://svn.apache.org/viewvc/incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java?rev=940016&r1=940015&r2=940016&view=diff ============================================================================== --- incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java (original) +++ incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java Sat May 1 13:48:07 2010 @@ -19,8 +19,9 @@ package org.apache.thrift.protocol; +import java.io.UnsupportedEncodingException; + import org.apache.thrift.TException; -import org.apache.thrift.Utf8Helper; import org.apache.thrift.transport.TTransport; /** @@ -179,9 +180,13 @@ public class TBinaryProtocol extends TPr } public void writeString(String str) throws TException { - byte[] dat = Utf8Helper.encode(str); - writeI32(dat.length); - trans_.write(dat, 0, dat.length); + try { + byte[] dat = str.getBytes("UTF-8"); + writeI32(dat.length); + trans_.write(dat, 0, dat.length); + } catch (UnsupportedEncodingException uex) { + throw new TException("JVM DOES NOT SUPPORT UTF-8"); + } } public void writeBinary(byte[] bin) throws TException { @@ -328,20 +333,27 @@ public class TBinaryProtocol extends TPr int size = readI32(); if (trans_.getBytesRemainingInBuffer() >= size) { - char[] charBuf = new char[size]; - int charsDecoded = Utf8Helper.decode(trans_.getBuffer(), trans_.getBufferPosition(), size, charBuf); - trans_.consumeBuffer(size); - return new String(charBuf, 0, charsDecoded); + try { + String s = new String(trans_.getBuffer(), trans_.getBufferPosition(), size, "UTF-8"); + trans_.consumeBuffer(size); + return s; + } catch (UnsupportedEncodingException e) { + throw new TException("JVM DOES NOT SUPPORT UTF-8"); + } } return readStringBody(size); } public String readStringBody(int size) throws TException { - checkReadLength(size); - byte[] buf = new byte[size]; - trans_.readAll(buf, 0, size); - return Utf8Helper.decode(buf); + try { + checkReadLength(size); + byte[] buf = new byte[size]; + trans_.readAll(buf, 0, size); + return new String(buf, "UTF-8"); + } catch (UnsupportedEncodingException uex) { + throw new TException("JVM DOES NOT SUPPORT UTF-8"); + } } public byte[] readBinary() throws TException { Modified: incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java URL: http://svn.apache.org/viewvc/incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java?rev=940016&r1=940015&r2=940016&view=diff ============================================================================== --- incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java (original) +++ incubator/thrift/tags/0.3.0/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java Sat May 1 13:48:07 2010 @@ -20,9 +20,10 @@ package org.apache.thrift.protocol; +import java.io.UnsupportedEncodingException; + import org.apache.thrift.ShortStack; import org.apache.thrift.TException; -import org.apache.thrift.Utf8Helper; import org.apache.thrift.transport.TTransport; /** @@ -292,7 +293,11 @@ public final class TCompactProtocol exte * Write a string to the wire with a varint size preceeding. */ public void writeString(String str) throws TException { - writeBinary(Utf8Helper.encode(str)); + try { + writeBinary(str.getBytes("UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new TException("UTF-8 not supported!"); + } } /** @@ -605,13 +610,16 @@ public final class TCompactProtocol exte return ""; } - if (trans_.getBytesRemainingInBuffer() >= length) { - char[] charBuf = new char[length]; - int charsDecoded = Utf8Helper.decode(trans_.getBuffer(), trans_.getBufferPosition(), length, charBuf); - trans_.consumeBuffer(length); - return new String(charBuf, 0, charsDecoded); - } else { - return Utf8Helper.decode(readBinary(length)); + try { + if (trans_.getBytesRemainingInBuffer() >= length) { + String str = new String(trans_.getBuffer(), trans_.getBufferPosition(), length, "UTF-8"); + trans_.consumeBuffer(length); + return str; + } else { + return new String(readBinary(length), "UTF-8"); + } + } catch (UnsupportedEncodingException e) { + throw new TException("UTF-8 not supported!"); } } From thrift-commits-return-1287yfarmer@example.org Sun May 02 22:40:26 2010 Return-Path: <thrift-commits-return-1287yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 16179 invoked from network); 2 May 2010 22:40:23 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 May 2010 22:40:23 -0000 Received: (qmail 53668 invoked by uid 500); 2 May 2010 22:40:23 -0000 Delivered-To: yfarmer@example.org Received: (qmail 53625 invoked by uid 500); 2 May 2010 22:40:23 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 53618 invoked by uid 99); 2 May 2010 22:40:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 22:40:22 +0000 X-ASF-Spam-Status: No, hits=-1857.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 22:40:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EE9F423888FE; Sun, 2 May 2010 22:39:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940325 - in /incubator/thrift/trunk: compiler/cpp/src/generate/t_java_generator.cc configure.ac lib/Makefile.am lib/php/Makefile.am Date: Sun, 02 May 2010 22:39:31 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Sun May 2 22:39:31 2010 New Revision: 940325 URL: http://svn.apache.org/viewvc?rev=940325&view=rev Log: THRIFT-647. php: PHP library is missing install target This patch adds a 'make install' target to a new PHP makefile. Patch: Anthony Molinaro Added: incubator/thrift/trunk/lib/php/Makefile.am Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc incubator/thrift/trunk/configure.ac incubator/thrift/trunk/lib/Makefile.am Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=940325&r1=940324&r2=940325&view=diff ============================================================================== --- incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original) +++ incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Sun May 2 22:39:31 2010 @@ -1899,7 +1899,11 @@ void t_java_generator888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4generate_java_bea indent(out) << "public boolean is" << get_cap_name("set") << cap_name << "() {" << endl; indent_up(); if (type_can_be_null(type)) { - indent(out) << "return this." << field_name << " != null;" << endl; + indent(out) << "return this." << field_name << " != null"; + if (type->is_struct() && ((t_struct*)type)->is_union()) { + out << " && this." << field_name << ".isSet()"; + } + out << ";" << endl; } else { indent(out) << "return __isset_bit_vector.get(" << isset_field_id(field) << ");" << endl; } Modified: incubator/thrift/trunk/configure.ac URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/configure.ac?rev=940325&r1=940324&r2=940325&view=diff ============================================================================== --- incubator/thrift/trunk/configure.ac (original) +++ incubator/thrift/trunk/configure.ac Sun May 2 22:39:31 2010 @@ -37,6 +37,12 @@ AC_ARG_VAR([JAVA_PREFIX], [Prefix for in Default = "/usr/local/lib"]) AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"]) +AC_ARG_VAR([PHP_PREFIX], [Prefix for installing PHP modules. + (Normal --prefix is ignored for PHP because + PHP has different conventions.) + Default = "/usr/lib/php"]) +AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"]) + AC_PROG_CC AC_PROG_CPP AC_PROG_CXX @@ -103,6 +109,12 @@ if test "$with_perl" = "yes"; then fi AM_CONDITIONAL(WITH_PERL, [test -n "$PERL"]) +AX_THRIFT_LIB(php, [PHP], yes) +if test "$with_php" = "yes"; then + AC_PATH_PROG([PHP], [php]) +fi +AM_CONDITIONAL(WITH_PHP, [test -n "$PHP"]) + AX_THRIFT_LIB(ruby, [Ruby], yes) if test "$with_ruby" = "yes"; then AC_PATH_PROG([RUBY], [ruby]) @@ -250,6 +262,7 @@ AC_CONFIG_FILES([ lib/java/Makefile lib/perl/Makefile lib/perl/test/Makefile + lib/php/Makefile lib/py/Makefile lib/rb/Makefile test/Makefile Modified: incubator/thrift/trunk/lib/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/Makefile.am?rev=940325&r1=940324&r2=940325&view=diff ============================================================================== --- incubator/thrift/trunk/lib/Makefile.am (original) +++ incubator/thrift/trunk/lib/Makefile.am Sun May 2 22:39:31 2010 @@ -44,6 +44,10 @@ if WITH_PERL SUBDIRS += perl endif +if WITH_PHP +SUBDIRS += php +endif + # All of the libs that don't use Automake need to go in here # so they will end up in our release tarballs. EXTRA_DIST = \ Added: incubator/thrift/trunk/lib/php/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/php/Makefile.am?rev=940325&view=auto ============================================================================== --- incubator/thrift/trunk/lib/php/Makefile.am (added) +++ incubator/thrift/trunk/lib/php/Makefile.am Sun May 2 22:39:31 2010 @@ -0,0 +1,29 @@ +phpdir = ${PHP_PREFIX} +php_DATA = \ + src/autoload.php \ + src/Thrift.php + +phpextdir = ${phpdir}/ext/thrift_protocol +phpext_DATA = \ + src/ext/thrift_protocol/config.m4 \ + src/ext/thrift_protocol/php_thrift_protocol.cpp \ + src/ext/thrift_protocol/php_thrift_protocol.h + +phpprotocoldir = ${phpdir}/protocol +phpprotocol_DATA = \ + src/protocol/TBinaryProtocol.php \ + src/protocol/TProtocol.php + +phptransportdir = ${phpdir}/transport +phptransport_DATA = \ + src/transport/TBufferedTransport.php \ + src/transport/TFramedTransport.php \ + src/transport/THttpClient.php \ + src/transport/TMemoryBuffer.php \ + src/transport/TNullTransport.php \ + src/transport/TPhpStream.php \ + src/transport/TSocket.php \ + src/transport/TSocketPool.php \ + src/transport/TTransport.php + +MAINTAINERCLEANFILES = Makefile Makefile.in From thrift-commits-return-1288yfarmer@example.org Sun May 02 22:55:17 2010 Return-Path: <thrift-commits-return-1288yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 17497 invoked from network); 2 May 2010 22:55:17 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 May 2010 22:55:17 -0000 Received: (qmail 58646 invoked by uid 500); 2 May 2010 22:55:17 -0000 Delivered-To: yfarmer@example.org Received: (qmail 58625 invoked by uid 500); 2 May 2010 22:55:17 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 58618 invoked by uid 99); 2 May 2010 22:55:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 22:55:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 22:55:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0A36623888FE; Sun, 2 May 2010 22:54:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940326 - in /incubator/thrift/trunk: configure.ac lib/erl/Makefile lib/erl/Makefile.am Date: Sun, 02 May 2010 22:54:22 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bryanduxbury Date: Sun May 2 22:54:22 2010 New Revision: 940326 URL: http://svn.apache.org/viewvc?rev=940326&view=rev Log: THRIFT-646. erl: Erlang library is missing install target This patch adds a new install target to the erlang makefile. It also converts the Makefile to Makefile.am Patch: Anthony Molinaro Added: incubator/thrift/trunk/lib/erl/Makefile.am Removed: incubator/thrift/trunk/lib/erl/Makefile Modified: incubator/thrift/trunk/configure.ac Modified: incubator/thrift/trunk/configure.ac URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/configure.ac?rev=940326&r1=940325&r2=940326&view=diff ============================================================================== --- incubator/thrift/trunk/configure.ac (original) +++ incubator/thrift/trunk/configure.ac Sun May 2 22:54:22 2010 @@ -259,6 +259,7 @@ AC_CONFIG_FILES([ lib/cpp/thrift-nb.pc lib/cpp/thrift-z.pc lib/csharp/Makefile + lib/erl/Makefile lib/java/Makefile lib/perl/Makefile lib/perl/test/Makefile Added: incubator/thrift/trunk/lib/erl/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/Makefile.am?rev=940326&view=auto ============================================================================== --- incubator/thrift/trunk/lib/erl/Makefile.am (added) +++ incubator/thrift/trunk/lib/erl/Makefile.am Sun May 2 22:54:22 2010 @@ -0,0 +1,57 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# directory where erlang library code should live +ERL_LIB_ROOT_DIR=$(shell erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell) + +MODULES = \ + src + +all clean docs: + for dir in $(MODULES); do \ + (cd $$dir; ${MAKE} $@); \ + done + +ERLLIBDIR=$(DESTDIR)$(ERL_LIB_ROOT_DIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) + +install: all + mkdir -p $(ERLLIBDIR) ; \ + mkdir -p $(ERLLIBDIR)/ebin ; \ + mkdir -p $(ERLLIBDIR)/include ; \ + mkdir -p $(ERLLIBDIR)/src ; \ + for i in ebin/*.app* ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done ; \ + for i in ebin/*.beam ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done ; \ + for i in include/*.hrl ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done ; \ + for i in src/*.erl ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done + +uninstall: + rm -rf $(ERLLIBDIR) + +check: all + +distclean: clean + +# Hack to make "make dist" work. +# This should not work, but it appears to. +distdir: + +MAINTAINERCLEANFILES = Makefile.in + +maintainer-clean: + test ! -d ebin || rm -rf ebin From thrift-commits-return-1289yfarmer@example.org Sun May 02 23:04:55 2010 Return-Path: <thrift-commits-return-1289yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 20033 invoked from network); 2 May 2010 23:04:55 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 May 2010 23:04:55 -0000 Received: (qmail 61371 invoked by uid 500); 2 May 2010 23:04:55 -0000 Delivered-To: yfarmer@example.org Received: (qmail 61353 invoked by uid 500); 2 May 2010 23:04:55 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 61346 invoked by uid 99); 2 May 2010 23:04:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 23:04:55 +0000 X-ASF-Spam-Status: No, hits=-1861.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 23:04:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6A81E23888CD; Sun, 2 May 2010 23:04:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940327 - in /incubator/thrift/trunk/test: Makefile.am TBufferBaseTest.cpp TMemoryBufferTest.cpp UnitTestMain.cpp Date: Sun, 02 May 2010 23:04:04 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Sun May 2 23:04:03 2010 New Revision: 940327 URL: http://svn.apache.org/viewvc?rev=940327&view=rev Log: THRIFT-650. build: Make Check fails on Centos/OSX with 0.2.0 tarball This patch fixes the make check target for OSX. Patch: Anthony Molinaro Modified: incubator/thrift/trunk/test/Makefile.am incubator/thrift/trunk/test/TBufferBaseTest.cpp incubator/thrift/trunk/test/TMemoryBufferTest.cpp incubator/thrift/trunk/test/UnitTestMain.cpp Modified: incubator/thrift/trunk/test/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/Makefile.am?rev=940327&r1=940326&r2=940327&view=diff ============================================================================== --- incubator/thrift/trunk/test/Makefile.am (original) +++ incubator/thrift/trunk/test/Makefile.am Sun May 2 23:04:03 2010 @@ -68,7 +68,7 @@ UnitTests_SOURCES = \ TMemoryBufferTest.cpp \ TBufferBaseTest.cpp -UnitTests_LDADD = libtestgencpp.la +UnitTests_LDADD = libtestgencpp.la -lboost_unit_test_framework # # TFDTransportTest Modified: incubator/thrift/trunk/test/TBufferBaseTest.cpp URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/TBufferBaseTest.cpp?rev=940327&r1=940326&r2=940327&view=diff ============================================================================== --- incubator/thrift/trunk/test/TBufferBaseTest.cpp (original) +++ incubator/thrift/trunk/test/TBufferBaseTest.cpp Sun May 2 23:04:03 2010 @@ -18,8 +18,7 @@ */ #include <algorithm> -#include <boost/foreach.hpp> -#include <boost/test/unit_test.hpp> +#include <boost/test/auto_unit_test.hpp> #include <transport/TBufferTransports.h> #include <transport/TShortReadTransport.h> @@ -30,8 +29,6 @@ using apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4thrift888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4transport888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TBuffer using apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4thrift888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4transport888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TFramedTransport; using apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4thrift888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4transport888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4test888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TShortReadTransport; -#define foreach BOOST_FOREACH - // Shamelessly copied from ZlibTransport. TODO: refactor. unsigned int dist[][5000] = { { 1<<15 }, @@ -175,7 +172,7 @@ void init_data() { } -BOOST_AUTO_TEST_SUITE( TBufferBaseTest ) +BOOST_AUTO_TEST_SUITE( TBufferBaseTest ); BOOST_AUTO_TEST_CASE( test_MemoryBuffer_Write_GetBuffer ) { init_data(); @@ -401,7 +398,8 @@ BOOST_AUTO_TEST_CASE( test_BufferedTrans 1<<14, 1<<17, }; - foreach (int size, sizes) { + for (int i = 0; i < sizeof (sizes) / sizeof (sizes[0]); i++) { + int size = sizes[i]; for (int d1 = 0; d1 < 3; d1++) { shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer(16)); TBufferedTransport trans(buffer, size); @@ -431,7 +429,8 @@ BOOST_AUTO_TEST_CASE( test_BufferedTrans 1<<14, 1<<17, }; - foreach (int size, sizes) { + for (int i = 0; i < sizeof (sizes) / sizeof (sizes[0]); i++) { + int size = sizes[i]; for (int d1 = 0; d1 < 3; d1++) { shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer(data, sizeof(data))); TBufferedTransport trans(buffer, size); @@ -463,7 +462,8 @@ BOOST_AUTO_TEST_CASE( test_BufferedTrans 1<<14, 1<<17, }; - foreach (int size, sizes) { + for (int i = 0; i < sizeof (sizes) / sizeof (sizes[0]); i++) { + int size = sizes[i]; for (int d1 = 0; d1 < 3; d1++) { shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer(data, sizeof(data))); shared_ptr<TShortReadTransport> tshort(new TShortReadTransport(buffer, 0.125)); @@ -496,7 +496,8 @@ BOOST_AUTO_TEST_CASE( test_FramedTranspo 1<<14, 1<<17, }; - foreach (int size, sizes) { + for (int i = 0; i < sizeof (sizes) / sizeof (sizes[0]); i++) { + int size = sizes[i]; for (int d1 = 0; d1 < 3; d1++) { shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer(16)); TFramedTransport trans(buffer, size); @@ -558,8 +559,10 @@ BOOST_AUTO_TEST_CASE( test_FramedTranspo int probs[] = { 1, 2, 4, 8, 16, 32, }; - foreach (int size, sizes) { - foreach (int prob, probs) { + for (int i = 0; i < sizeof (sizes) / sizeof (sizes[0]); i++) { + int size = sizes[i]; + for (int j = 0; j < sizeof (probs) / sizeof (probs[0]); j++) { + int prob = probs[j]; for (int d1 = 0; d1 < 3; d1++) { shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer(16)); TFramedTransport trans(buffer, size); @@ -588,7 +591,9 @@ BOOST_AUTO_TEST_CASE( test_FramedTranspo int read_offset = 0; int read_index = 0; - foreach (int fsize, flush_sizes) { + + for (int k = 0; k < flush_sizes.size(); k++) { + int fsize = flush_sizes[k]; // We are exploiting an implementation detail of TFramedTransport. // The read buffer starts empty and it will never do more than one // readFrame per read, so we should always get exactly one frame. @@ -636,4 +641,4 @@ BOOST_AUTO_TEST_CASE( test_FramedTranspo BOOST_CHECK_EQUAL(buffer->getBufferAsString(), output2); } -BOOST_AUTO_TEST_SUITE_END() +BOOST_AUTO_TEST_SUITE_END(); Modified: incubator/thrift/trunk/test/TMemoryBufferTest.cpp URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/TMemoryBufferTest.cpp?rev=940327&r1=940326&r2=940327&view=diff ============================================================================== --- incubator/thrift/trunk/test/TMemoryBufferTest.cpp (original) +++ incubator/thrift/trunk/test/TMemoryBufferTest.cpp Sun May 2 23:04:03 2010 @@ -17,7 +17,7 @@ * under the License. */ -#include <boost/test/unit_test.hpp> +#include <boost/test/auto_unit_test.hpp> #include <iostream> #include <climits> #include <cassert> @@ -25,7 +25,7 @@ #include <protocol/TBinaryProtocol.h> #include "gen-cpp/ThriftTest_types.h" -BOOST_AUTO_TEST_SUITE( TMemoryBufferTest ) +BOOST_AUTO_TEST_SUITE( TMemoryBufferTest ); BOOST_AUTO_TEST_CASE( test_roundtrip ) { using apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4thrift888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4transport888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TMemoryBuffer; @@ -104,4 +104,4 @@ BOOST_AUTO_TEST_CASE( test_exceptions ) } } -BOOST_AUTO_TEST_SUITE_END() +BOOST_AUTO_TEST_SUITE_END(); Modified: incubator/thrift/trunk/test/UnitTestMain.cpp URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/UnitTestMain.cpp?rev=940327&r1=940326&r2=940327&view=diff ============================================================================== --- incubator/thrift/trunk/test/UnitTestMain.cpp (original) +++ incubator/thrift/trunk/test/UnitTestMain.cpp Sun May 2 23:04:03 2010 @@ -18,4 +18,6 @@ */ #define BOOST_TEST_MODULE thrift -#include <boost/test/included/unit_test.hpp> +#define BOOST_TEST_DYN_LINK +#define BOOST_AUTO_TEST_MAIN +#include <boost/test/auto_unit_test.hpp> From thrift-commits-return-1290yfarmer@example.org Mon May 03 21:33:55 2010 Return-Path: <thrift-commits-return-1290yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 14504 invoked from network); 3 May 2010 21:33:55 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 3 May 2010 21:33:55 -0000 Received: (qmail 53296 invoked by uid 500); 3 May 2010 21:33:55 -0000 Delivered-To: yfarmer@example.org Received: (qmail 53242 invoked by uid 500); 3 May 2010 21:33:55 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 53235 invoked by uid 99); 3 May 2010 21:33:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 21:33:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 21:33:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0CCE2238899B; Mon, 3 May 2010 21:33:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940630 - in /incubator/thrift/trunk: Makefile.am compiler/cpp/Makefile.am compiler/cpp/src/main.cc compiler/cpp/version.h.in configure.ac lib/erl/ lib/php/ print_version.sh test/Makefile.am Date: Mon, 03 May 2010 21:33:00 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bryanduxbury Date: Mon May 3 21:33:00 2010 New Revision: 940630 URL: http://svn.apache.org/viewvc?rev=940630&view=rev Log: THRIFT-770. build: Get 'make dist' to work without first compiling source code This patch ditches the old print_version.sh method and instead generates the compiler's version.h via the Makefile. Patch: Anthony Molinaro Added: incubator/thrift/trunk/compiler/cpp/version.h.in Removed: incubator/thrift/trunk/print_version.sh Modified: incubator/thrift/trunk/Makefile.am incubator/thrift/trunk/compiler/cpp/Makefile.am incubator/thrift/trunk/compiler/cpp/src/main.cc incubator/thrift/trunk/configure.ac incubator/thrift/trunk/lib/erl/ (props changed) incubator/thrift/trunk/lib/php/ (props changed) incubator/thrift/trunk/test/Makefile.am Modified: incubator/thrift/trunk/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/Makefile.am?rev=940630&r1=940629&r2=940630&view=diff ============================================================================== --- incubator/thrift/trunk/Makefile.am (original) +++ incubator/thrift/trunk/Makefile.am Mon May 3 21:33:00 2010 @@ -24,5 +24,5 @@ SUBDIRS = compiler/cpp lib test dist-hook: find $(distdir) -name '.[a-zA-Z0-9]*' | xargs rm -rf -EXTRA_DIST = bootstrap.sh cleanup.sh print_version.sh doc tutorial contrib \ +EXTRA_DIST = bootstrap.sh cleanup.sh doc tutorial contrib \ CONTRIBUTORS LICENSE CHANGES DISCLAIMER NOTICE Modified: incubator/thrift/trunk/compiler/cpp/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/Makefile.am?rev=940630&r1=940629&r2=940630&view=diff ============================================================================== --- incubator/thrift/trunk/compiler/cpp/Makefile.am (original) +++ incubator/thrift/trunk/compiler/cpp/Makefile.am Mon May 3 21:33:00 2010 @@ -118,29 +118,3 @@ clean-local: $(RM) thriftl.cc thrifty.cc thrifty.h version.h src/main.cc: version.h - -# Adding this to BUILT_SOURCES will cause version.h to be -# regenerated on every "make all" or "make check", which is -# necessary because it changes whenever we "svn up" or similar. -# Ideally, we would like this to be regenerated whenever the -# compiler is rebuilt, but every way we could think of to do -# that caused unnecessary rebuilds of the compiler. -BUILT_SOURCES += regen_version_h - -THRIFT_VERSION=$(shell /bin/sh $(top_srcdir)/print_version.sh -v) -THRIFT_REVISION=$(shell /bin/sh $(top_srcdir)/print_version.sh -r) - -regen_version_h: - @printf "Regenerating version.h... " - @TMPFILE=`mktemp ./version_h.tmp_XXXXXX` ; \ - echo "// AUTOGENERATED, DO NOT EDIT" > $$TMPFILE ; \ - echo '#define THRIFT_VERSION "$(THRIFT_VERSION)"' >> $$TMPFILE ; \ - echo '#define THRIFT_REVISION "$(THRIFT_REVISION)"' >> $$TMPFILE ; \ - if cmp $$TMPFILE version.h >/dev/null ; \ - then \ - rm -f $$TMPFILE ; \ - echo "No changes." ; \ - else \ - mv $$TMPFILE version.h ; \ - echo "Updated." ; \ - fi Modified: incubator/thrift/trunk/compiler/cpp/src/main.cc URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/main.cc?rev=940630&r1=940629&r2=940630&view=diff ============================================================================== --- incubator/thrift/trunk/compiler/cpp/src/main.cc (original) +++ incubator/thrift/trunk/compiler/cpp/src/main.cc Mon May 3 21:33:00 2010 @@ -618,7 +618,7 @@ void generate_all_fingerprints(t_program * Prints the version number */ void version() { - printf("Thrift version %s-%s\n", THRIFT_VERSION, THRIFT_REVISION); + printf("Thrift version %s\n", THRIFT_VERSION); } /** Added: incubator/thrift/trunk/compiler/cpp/version.h.in URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/version.h.in?rev=940630&view=auto ============================================================================== --- incubator/thrift/trunk/compiler/cpp/version.h.in (added) +++ incubator/thrift/trunk/compiler/cpp/version.h.in Mon May 3 21:33:00 2010 @@ -0,0 +1 @@ +#define THRIFT_VERSION "@PACKAGE_VERSION@" Modified: incubator/thrift/trunk/configure.ac URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/configure.ac?rev=940630&r1=940629&r2=940630&view=diff ============================================================================== --- incubator/thrift/trunk/configure.ac (original) +++ incubator/thrift/trunk/configure.ac Mon May 3 21:33:00 2010 @@ -253,6 +253,7 @@ AC_CONFIG_HEADERS(config.h:config.hin) AC_CONFIG_FILES([ Makefile compiler/cpp/Makefile + compiler/cpp/version.h lib/Makefile lib/cpp/Makefile lib/cpp/thrift.pc Propchange: incubator/thrift/trunk/lib/erl/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon May 3 21:33:00 2010 @@ -0,0 +1,2 @@ +Makefile.in +Makefile Propchange: incubator/thrift/trunk/lib/php/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon May 3 21:33:00 2010 @@ -0,0 +1,2 @@ +Makefile.in +Makefile Modified: incubator/thrift/trunk/test/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/Makefile.am?rev=940630&r1=940629&r2=940630&view=diff ============================================================================== --- incubator/thrift/trunk/test/Makefile.am (original) +++ incubator/thrift/trunk/test/Makefile.am Mon May 3 21:33:00 2010 @@ -28,7 +28,7 @@ SUBDIRS += rb endif noinst_LTLIBRARIES = libtestgencpp.la -libtestgencpp_la_SOURCES = \ +nodist_libtestgencpp_la_SOURCES = \ gen-cpp/DebugProtoTest_types.cpp \ gen-cpp/OptionalRequiredTest_types.cpp \ gen-cpp/DebugProtoTest_types.cpp \ @@ -175,4 +175,7 @@ EXTRA_DIST = \ ThriftTest.thrift \ ZlibTest.cpp \ DenseProtoTest.cpp \ - FastbinaryTest.py + FastbinaryTest.py \ + ThriftTest_extras.cpp \ + DebugProtoTest_extras.cpp + From thrift-commits-return-1291yfarmer@example.org Tue May 04 14:02:06 2010 Return-Path: <thrift-commits-return-1291yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 22923 invoked from network); 4 May 2010 14:02:06 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 4 May 2010 14:02:06 -0000 Received: (qmail 18836 invoked by uid 500); 4 May 2010 14:02:06 -0000 Delivered-To: yfarmer@example.org Received: (qmail 18778 invoked by uid 500); 4 May 2010 14:02:05 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 18771 invoked by uid 99); 4 May 2010 14:02:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 14:02:05 +0000 X-ASF-Spam-Status: No, hits=-1865.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 14:02:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9440923889D2; Tue, 4 May 2010 14:01:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940861 - /incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Date: Tue, 04 May 2010 14:01:14 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Tue May 4 14:01:14 2010 New Revision: 940861 URL: http://svn.apache.org/viewvc?rev=940861&view=rev Log: revert an unintentional commit to the java generator Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=940861&r1=940860&r2=940861&view=diff ============================================================================== --- incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original) +++ incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Tue May 4 14:01:14 2010 @@ -1899,11 +1899,7 @@ void t_java_generator888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4generate_java_bea indent(out) << "public boolean is" << get_cap_name("set") << cap_name << "() {" << endl; indent_up(); if (type_can_be_null(type)) { - indent(out) << "return this." << field_name << " != null"; - if (type->is_struct() && ((t_struct*)type)->is_union()) { - out << " && this." << field_name << ".isSet()"; - } - out << ";" << endl; + indent(out) << "return this." << field_name << " != null;" << endl; } else { indent(out) << "return __isset_bit_vector.get(" << isset_field_id(field) << ");" << endl; } From thrift-commits-return-1292yfarmer@example.org Tue May 04 16:33:29 2010 Return-Path: <thrift-commits-return-1292yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 60229 invoked from network); 4 May 2010 16:33:29 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 4 May 2010 16:33:29 -0000 Received: (qmail 53776 invoked by uid 500); 4 May 2010 16:33:29 -0000 Delivered-To: yfarmer@example.org Received: (qmail 53744 invoked by uid 500); 4 May 2010 16:33:28 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 53735 invoked by uid 99); 4 May 2010 16:33:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 16:33:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 16:33:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7975A238899C; Tue, 4 May 2010 16:32:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940936 - /incubator/thrift/trunk/lib/php/Makefile.am Date: Tue, 04 May 2010 16:32:33 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dreiss Date: Tue May 4 16:32:33 2010 New Revision: 940936 URL: http://svn.apache.org/viewvc?rev=940936&view=rev Log: THRIFT-647. php: Add license header and fix style in Makefile.am The attachment was made with the "licensed for inclusion" option, so it should get a standard Apache license header. Our other makefiles use $() style for variables and don't include extra spaces before backslashes. Modified: incubator/thrift/trunk/lib/php/Makefile.am Modified: incubator/thrift/trunk/lib/php/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/php/Makefile.am?rev=940936&r1=940935&r2=940936&view=diff ============================================================================== --- incubator/thrift/trunk/lib/php/Makefile.am (original) +++ incubator/thrift/trunk/lib/php/Makefile.am Tue May 4 16:32:33 2010 @@ -1,29 +1,48 @@ -phpdir = ${PHP_PREFIX} +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +phpdir = $(PHP_PREFIX) php_DATA = \ src/autoload.php \ src/Thrift.php -phpextdir = ${phpdir}/ext/thrift_protocol +phpextdir = $(phpdir)/ext/thrift_protocol phpext_DATA = \ - src/ext/thrift_protocol/config.m4 \ - src/ext/thrift_protocol/php_thrift_protocol.cpp \ + src/ext/thrift_protocol/config.m4 \ + src/ext/thrift_protocol/php_thrift_protocol.cpp \ src/ext/thrift_protocol/php_thrift_protocol.h -phpprotocoldir = ${phpdir}/protocol +phpprotocoldir = $(phpdir)/protocol phpprotocol_DATA = \ - src/protocol/TBinaryProtocol.php \ + src/protocol/TBinaryProtocol.php \ src/protocol/TProtocol.php -phptransportdir = ${phpdir}/transport +phptransportdir = $(phpdir)/transport phptransport_DATA = \ - src/transport/TBufferedTransport.php \ - src/transport/TFramedTransport.php \ - src/transport/THttpClient.php \ - src/transport/TMemoryBuffer.php \ - src/transport/TNullTransport.php \ - src/transport/TPhpStream.php \ - src/transport/TSocket.php \ - src/transport/TSocketPool.php \ + src/transport/TBufferedTransport.php \ + src/transport/TFramedTransport.php \ + src/transport/THttpClient.php \ + src/transport/TMemoryBuffer.php \ + src/transport/TNullTransport.php \ + src/transport/TPhpStream.php \ + src/transport/TSocket.php \ + src/transport/TSocketPool.php \ src/transport/TTransport.php MAINTAINERCLEANFILES = Makefile Makefile.in From thrift-commits-return-1293yfarmer@example.org Fri May 07 18:44:58 2010 Return-Path: <thrift-commits-return-1293yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 18267 invoked from network); 7 May 2010 18:44:57 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 18:44:57 -0000 Received: (qmail 84093 invoked by uid 500); 7 May 2010 18:44:57 -0000 Delivered-To: yfarmer@example.org Received: (qmail 84050 invoked by uid 500); 7 May 2010 18:44:57 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 84019 invoked by uid 99); 7 May 2010 18:44:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 18:44:57 +0000 X-ASF-Spam-Status: No, hits=-1868.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 18:44:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5989223889D5; Fri, 7 May 2010 18:44:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942174 - /incubator/thrift/tags/0.3.0/ Date: Fri, 07 May 2010 18:44:06 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Fri May 7 18:44:06 2010 New Revision: 942174 URL: http://svn.apache.org/viewvc?rev=942174&view=rev Log: deleting premature tag of 0.3.0 Removed: incubator/thrift/tags/0.3.0/ From thrift-commits-return-1294yfarmer@example.org Fri May 07 18:45:39 2010 Return-Path: <thrift-commits-return-1294yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 18322 invoked from network); 7 May 2010 18:45:39 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 18:45:39 -0000 Received: (qmail 84213 invoked by uid 500); 7 May 2010 18:45:39 -0000 Delivered-To: yfarmer@example.org Received: (qmail 84181 invoked by uid 500); 7 May 2010 18:45:39 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 84174 invoked by uid 99); 7 May 2010 18:45:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 18:45:39 +0000 X-ASF-Spam-Status: No, hits=-1872.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 18:45:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0AFF323888FE; Fri, 7 May 2010 18:44:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942175 - /incubator/thrift/branches/0.3.0/ Date: Fri, 07 May 2010 18:44:49 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Fri May 7 18:44:48 2010 New Revision: 942175 URL: http://svn.apache.org/viewvc?rev=942175&view=rev Log: cut a branch for preparing for the 0.3.0 release Added: incubator/thrift/branches/0.3.0/ - copied from r942174, incubator/thrift/trunk/ From thrift-commits-return-1295yfarmer@example.org Fri May 07 18:56:45 2010 Return-Path: <thrift-commits-return-1295yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 22792 invoked from network); 7 May 2010 18:56:45 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 18:56:45 -0000 Received: (qmail 99340 invoked by uid 500); 7 May 2010 18:56:45 -0000 Delivered-To: yfarmer@example.org Received: (qmail 99318 invoked by uid 500); 7 May 2010 18:56:45 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 99311 invoked by uid 99); 7 May 2010 18:56:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 18:56:45 +0000 X-ASF-Spam-Status: No, hits=-1875.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 18:56:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5386923888FE; Fri, 7 May 2010 18:55:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942178 - in /incubator/thrift/branches/0.3.0: configure.ac lib/rb/Rakefile Date: Fri, 07 May 2010 18:55:54 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Fri May 7 18:55:53 2010 New Revision: 942178 URL: http://svn.apache.org/viewvc?rev=942178&view=rev Log: bump some version numbers to where they belong Modified: incubator/thrift/branches/0.3.0/configure.ac incubator/thrift/branches/0.3.0/lib/rb/Rakefile Modified: incubator/thrift/branches/0.3.0/configure.ac URL: http://svn.apache.org/viewvc/incubator/thrift/branches/0.3.0/configure.ac?rev=942178&r1=942177&r2=942178&view=diff ============================================================================== --- incubator/thrift/branches/0.3.0/configure.ac (original) +++ incubator/thrift/branches/0.3.0/configure.ac Fri May 7 18:55:53 2010 @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([thrift], [0.4.0-dev]) +AC_INIT([thrift], [0.3.0]) AC_CONFIG_AUX_DIR([.]) Modified: incubator/thrift/branches/0.3.0/lib/rb/Rakefile URL: http://svn.apache.org/viewvc/incubator/thrift/branches/0.3.0/lib/rb/Rakefile?rev=942178&r1=942177&r2=942178&view=diff ============================================================================== --- incubator/thrift/branches/0.3.0/lib/rb/Rakefile (original) +++ incubator/thrift/branches/0.3.0/lib/rb/Rakefile Fri May 7 18:55:53 2010 @@ -82,7 +82,7 @@ begin p.summary = "Ruby libraries for Thrift (a language-agnostic RPC system)" p.url = "http://incubator.apache.org/thrift/" p.include_rakefile = true - p.version = "0.2.5" + p.version = "0.3.0" p.rubygems_version = ">= 1.2.0" end From thrift-commits-return-1296yfarmer@example.org Fri May 07 20:09:01 2010 Return-Path: <thrift-commits-return-1296yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 43726 invoked from network); 7 May 2010 20:09:01 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 20:09:01 -0000 Received: (qmail 13449 invoked by uid 500); 7 May 2010 20:09:01 -0000 Delivered-To: yfarmer@example.org Received: (qmail 13408 invoked by uid 500); 7 May 2010 20:09:01 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 13401 invoked by uid 99); 7 May 2010 20:09:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 20:09:00 +0000 X-ASF-Spam-Status: No, hits=-1250.8 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 20:08:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CCC9623888FE; Fri, 7 May 2010 20:08:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942197 - /incubator/thrift/trunk/lib/Makefile.am Date: Fri, 07 May 2010 20:08:03 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: dreiss Date: Fri May 7 20:08:03 2010 New Revision: 942197 URL: http://svn.apache.org/viewvc?rev=942197&view=rev Log: Clean up a little bit of extra whitespace Modified: incubator/thrift/trunk/lib/Makefile.am Modified: incubator/thrift/trunk/lib/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/Makefile.am?rev=942197&r1=942196&r2=942197&view=diff ============================================================================== --- incubator/thrift/trunk/lib/Makefile.am (original) +++ incubator/thrift/trunk/lib/Makefile.am Fri May 7 20:08:03 2010 @@ -52,8 +52,8 @@ endif # so they will end up in our release tarballs. EXTRA_DIST = \ cocoa \ - hs \ + hs \ ocaml \ - php \ - erl \ + php \ + erl \ st From thrift-commits-return-1297yfarmer@example.org Fri May 07 20:09:04 2010 Return-Path: <thrift-commits-return-1297yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 43737 invoked from network); 7 May 2010 20:09:04 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 7 May 2010 20:09:04 -0000 Received: (qmail 13508 invoked by uid 500); 7 May 2010 20:09:04 -0000 Delivered-To: yfarmer@example.org Received: (qmail 13474 invoked by uid 500); 7 May 2010 20:09:03 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 13467 invoked by uid 99); 7 May 2010 20:09:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 20:09:03 +0000 X-ASF-Spam-Status: No, hits=-1400.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 20:09:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D7F40238898B; Fri, 7 May 2010 20:08:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942198 - /incubator/thrift/trunk/lib/Makefile.am Date: Fri, 07 May 2010 20:08:06 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: dreiss Date: Fri May 7 20:08:06 2010 New Revision: 942198 URL: http://svn.apache.org/viewvc?rev=942198&view=rev Log: THRIFT-373. Include js and as3 libraries in release tarballs Modified: incubator/thrift/trunk/lib/Makefile.am Modified: incubator/thrift/trunk/lib/Makefile.am URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/Makefile.am?rev=942198&r1=942197&r2=942198&view=diff ============================================================================== --- incubator/thrift/trunk/lib/Makefile.am (original) +++ incubator/thrift/trunk/lib/Makefile.am Fri May 7 20:08:06 2010 @@ -56,4 +56,6 @@ EXTRA_DIST = \ ocaml \ php \ erl \ + js \ + as3 \ st From thrift-commits-return-1298yfarmer@example.org Sat May 08 14:06:26 2010 Return-Path: <thrift-commits-return-1298yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 13864 invoked from network); 8 May 2010 14:06:26 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 8 May 2010 14:06:26 -0000 Received: (qmail 17837 invoked by uid 500); 8 May 2010 14:06:26 -0000 Delivered-To: yfarmer@example.org Received: (qmail 17785 invoked by uid 500); 8 May 2010 14:06:26 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 17778 invoked by uid 99); 8 May 2010 14:06:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 May 2010 14:06:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eos.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 May 2010 14:06:23 +0000 Received: from eos.apache.org (localhost [83.161.120.155]) by eos.apache.org (Postfix) with ESMTP id 271C916E29 for <yfarmer@example.org>; Sat, 8 May 2010 14:06:02 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki <yfarmer@example.org> To: Apache Wiki <yfarmer@example.org> Date: Sat, 08 May 2010 14:06:01 -0000 Message-ID: <yfarmer@example.org> Subject: =?utf-8?q?=5BThrift_Wiki=5D_Update_of_=22ThriftInstallationWin32=22_by_Ti?= =?utf-8?q?mWilson-Brown?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Thrift Wiki" for ch= ange notification. The "ThriftInstallationWin32" page has been changed by TimWilson-Brown. The comment on this change is: Updated notes about fork crash. http://wiki.apache.org/thrift/ThriftInstallationWin32?action=3Ddiff&rev1=3D= 22&rev2=3D23 -------------------------------------------------- = TODO - diagnose issue further = - =3D=3D=3D=3D C++ runtime segfault with cygwin 1.7.5-1, g++-4, fork() and = throw =3D=3D=3D=3D + =3D=3D=3D=3D C++ runtime segfault with cygwin 1.7.5-1, g++-4.3.4, fork() = and throw =3D=3D=3D=3D = If your thrift C++ programs segfault on throw after fork()ing, compile th= em with g++-3. = - More information is available on the cygwin mailing list at http://cygwin= .com/ml/cygwin/2010-04/msg00957.html + The issue and patch are described on the Cygwin mailing list at http://cy= gwin.com/ml/cygwin/2010-05/msg00203.html + = + This issue should be fixed in Cygwin versions after 1.7.5-1, or g++ 4.5.0. + = = =3D=3D Installation from Source (No Cygwin dependency) =3D=3D To compile the Thrift generator & runtime libraries (untested) without th= e cygwin.dll dependency you need to install MinGW (www.mingw.org). In addi= tion you need to add the following entry to your windows PATH variable. From thrift-commits-return-1299yfarmer@example.org Wed May 12 20:54:31 2010 Return-Path: <thrift-commits-return-1299yfarmer@example.org> Delivered-To: yfarmer@example.org Received: (qmail 13368 invoked from network); 12 May 2010 20:54:31 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 12 May 2010 20:54:31 -0000 Received: (qmail 75635 invoked by uid 500); 12 May 2010 20:54:31 -0000 Delivered-To: yfarmer@example.org Received: (qmail 75583 invoked by uid 500); 12 May 2010 20:54:30 -0000 Mailing-List: contact yfarmer@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:yfarmer@example.org> List-Unsubscribe: <mailto:yfarmer@example.org> List-Post: <mailto:yfarmer@example.org> List-Id: <thrift-commits.incubator.apache.org> Reply-To: yfarmer@example.org Delivered-To: mailing list yfarmer@example.org Received: (qmail 75576 invoked by uid 99); 12 May 2010 20:54:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 20:54:30 +0000 X-ASF-Spam-Status: No, hits=-1878.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 20:54:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DC8332388900; Wed, 12 May 2010 20:54:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r943679 - in /incubator/thrift/trunk/lib/java: src/org/apache/thrift/TDeserializer.java test/org/apache/thrift/TestTDeserializer.java Date: Wed, 12 May 2010 20:54:07 -0000 To: yfarmer@example.org From: yfarmer@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <yfarmer@example.org> Author: bryanduxbury Date: Wed May 12 20:54:07 2010 New Revision: 943679 URL: http://svn.apache.org/viewvc?rev=943679&view=rev Log: THRIFT-774. java: TDeserializer should provide a partialDeserialize method for primitive types This patch adds partialDeserialize* methods for each of the supported Thrift primitives. Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/TDeserializer.java incubator/thrift/trunk/lib/java/test/org/apache/thrift/TestTDeserializer.java Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/TDeserializer.java URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/src/org/apache/thrift/TDeserializer.java?rev=943679&r1=943678&r2=943679&view=diff ============================================================================== --- incubator/thrift/trunk/lib/java/src/org/apache/thrift/TDeserializer.java (original) +++ incubator/thrift/trunk/lib/java/src/org/apache/thrift/TDeserializer.java Wed May 12 20:54:07 2010 @@ -91,54 +91,195 @@ public class TDeserializer { /** * Deserialize only a single Thrift object (addressed by recursively using field id) - * from a byte record. - * @param record The object to read from + * from a byte record. * @param tb The object to read into - * @param fieldIdPath The FieldId's that define a path tb + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path tb + * @param fieldIdPathRest The rest FieldId's that define a path tb * @throws TException */ - public void partialDeserialize(TBase tb, byte[] bytes, TFieldIdEnum ... fieldIdPath) throws TException { + public void partialDeserialize(TBase tb, byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { try { - // if there are no elements in the path, then the user is looking for the - // regular deserialize method - // TODO: it might be nice not to have to do this check every time to save - // some performance. - if (fieldIdPath.length == 0) { - deserialize(tb, bytes); - return; - } + if (locateField(bytes, fieldIdPathFirst, fieldIdPathRest) != null) { + // if this line is reached, iprot will be positioned at the start of tb. + tb.read(protocol_); + } + } catch (Exception e) { + throw new TException(e); + } finally { + protocol_.reset(); + } + } + + /** + * Deserialize only a boolean field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to a boolean field + * @param fieldIdPathRest The rest FieldId's that define a path to a boolean field + * @throws TException + */ + public Boolean partialDeserializeBool(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (Boolean) partialDeserializeField(TType.BOOL, bytes, fieldIdPathFirst, fieldIdPathRest); + } + + /** + * Deserialize only a byte field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to a byte field + * @param fieldIdPathRest The rest FieldId's that define a path to a byte field + * @throws TException + */ + public Byte partialDeserializeByte(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (Byte) partialDeserializeField(TType.BYTE, bytes, fieldIdPathFirst, fieldIdPathRest); + } - trans_.reset(bytes); + /** + * Deserialize only a double field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to a double field + * @param fieldIdPathRest The rest FieldId's that define a path to a double field + * @throws TException + */ + public Double partialDeserializeDouble(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (Double) partialDeserializeField(TType.DOUBLE, bytes, fieldIdPathFirst, fieldIdPathRest); + } - // index into field ID path being currently searched for - int curPathIndex = 0; + /** + * Deserialize only an i16 field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to an i16 field + * @param fieldIdPathRest The rest FieldId's that define a path to an i16 field + * @throws TException + */ + public Short partialDeserializeI16(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (Short) partialDeserializeField(TType.I16, bytes, fieldIdPathFirst, fieldIdPathRest); + } - protocol_.readStructBegin(); + /** + * Deserialize only an i32 field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to an i32 field + * @param fieldIdPathRest The rest FieldId's that define a path to an i32 field + * @throws TException + */ + public Integer partialDeserializeI32(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (Integer) partialDeserializeField(TType.I32, bytes, fieldIdPathFirst, fieldIdPathRest); + } - while (curPathIndex < fieldIdPath.length) { - TField field = protocol_.readFieldBegin(); - // we can stop searching if we either see a stop or we go past the field - // id we're looking for (since fields should now be serialized in asc - // order). - if (field.type == TType.STOP || field.id > fieldIdPath[curPathIndex].getThriftFieldId()) { - return; - } + /** + * Deserialize only an i64 field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to an i64 field + * @param fieldIdPathRest The rest FieldId's that define a path to an i64 field + * @throws TException + */ + public Long partialDeserializeI64(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (Long) partialDeserializeField(TType.I64, bytes, fieldIdPathFirst, fieldIdPathRest); + } - if (field.id != fieldIdPath[curPathIndex].getThriftFieldId()) { - // Not the field we're looking for. Skip field. - TProtocolUtil.skip(protocol_, field.type); - protocol_.readFieldEnd(); - } else { - // This field is the next step in the path. Step into field. - curPathIndex++; - if (curPathIndex < fieldIdPath.length) { - protocol_.readStructBegin(); - } - } + /** + * Deserialize only a string field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to a string field + * @param fieldIdPathRest The rest FieldId's that define a path to a string field + * @throws TException + */ + public String partialDeserializeString(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + return (String) partialDeserializeField(TType.STRING, bytes, fieldIdPathFirst, fieldIdPathRest); + } + + /** + * Deserialize only a binary field (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to a binary field + * @param fieldIdPathRest The rest FieldId's that define a path to a binary field + * @throws TException + */ + public byte[] partialDeserializeByteArray(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + // TType does not have binary, so we use the arbitrary num 100 + return (byte[]) partialDeserializeField((byte)100, bytes, fieldIdPathFirst, fieldIdPathRest); + } + + /** + * Deserialize only the id of the field set in a TUnion (addressed by recursively using field id) + * from a byte record. + * @param bytes The serialized object to read from + * @param fieldIdPathFirst First of the FieldId's that define a path to a TUnion + * @param fieldIdPathRest The rest FieldId's that define a path to a TUnion + * @throws TException + */ + public Short partialDeserializeSetFieldIdInUnion(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + try { + TField field = locateField(bytes, fieldIdPathFirst, fieldIdPathRest); + if (field != null){ + protocol_.readStructBegin(); // The Union + return protocol_.readFieldBegin().id; // The field set in the union } + return null; + } catch (Exception e) { + throw new TException(e); + } finally { + protocol_.reset(); + } + } - // when this line is reached, iprot will be positioned at the start of tb. - tb.read(protocol_); + private Object partialDeserializeField(byte ttype, byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + try { + TField field = locateField(bytes, fieldIdPathFirst, fieldIdPathRest); + if (field != null) { + // if this point is reached, iprot will be positioned at the start of the field. + switch(ttype){ + case TType.BOOL: + if (field.type == TType.BOOL){ + return protocol_.readBool(); + } + break; + case TType.BYTE: + if (field.type == TType.BYTE) { + return protocol_.readByte(); + } + break; + case TType.DOUBLE: + if (field.type == TType.DOUBLE) { + return protocol_.readDouble(); + } + break; + case TType.I16: + if (field.type == TType.I16) { + return protocol_.readI16(); + } + break; + case TType.I32: + if (field.type == TType.I32) { + return protocol_.readI32(); + } + break; + case TType.I64: + if (field.type == TType.I64) { + return protocol_.readI64(); + } + break; + case TType.STRING: + if (field.type == TType.STRING) { + return protocol_.readString(); + } + break; + case 100: // hack to differentiate between string and binary + if (field.type == TType.STRING) { + return protocol_.readBinary(); + } + break; + } + } + return null; } catch (Exception e) { throw new TException(e); } finally { @@ -146,6 +287,47 @@ public class TDeserializer { } } + private TField locateField(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum ... fieldIdPathRest) throws TException { + trans_.reset(bytes); + + TFieldIdEnum[] fieldIdPath= new TFieldIdEnum[fieldIdPathRest.length + 1]; + fieldIdPath[0] = fieldIdPathFirst; + for (int i = 0; i < fieldIdPathRest.length; i++){ + fieldIdPath[i + 1] = fieldIdPathRest[i]; + } + + // index into field ID path being currently searched for + int curPathIndex = 0; + + // this will be the located field, or null if it is not located + TField field = null; + + protocol_.readStructBegin(); + + while (curPathIndex < fieldIdPath.length) { +
{'source': 'Apache Software Foundation Public Mail Archives'}