From d40731edb2744d9b1234c6bcea22788b65e81a23 Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Fri, 20 Mar 2009 02:21:05 +0000 Subject: [PATCH] THRIFT-313. rb: BinaryProtocolAccelerated and BinaryProtocol don't produce the same bytes when writes aren't strict A Fixnum was not properly being converted to its native value before being written. This patch rectifies that problem. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756308 13f79535-47bb-0310-9956-ffa450edef68 --- lib/rb/ext/binary_protocol_accelerated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rb/ext/binary_protocol_accelerated.c b/lib/rb/ext/binary_protocol_accelerated.c index bb4f4a3a..45f5a529 100644 --- a/lib/rb/ext/binary_protocol_accelerated.c +++ b/lib/rb/ext/binary_protocol_accelerated.c @@ -103,7 +103,7 @@ VALUE rb_thrift_binary_proto_write_message_begin(VALUE self, VALUE name, VALUE t write_i32_direct(trans, FIX2INT(seqid)); } else { write_string_direct(trans, name); - write_byte_direct(trans, type); + write_byte_direct(trans, FIX2INT(type)); write_i32_direct(trans, FIX2INT(seqid)); } -- 2.17.1