THRIFT-313. rb: BinaryProtocolAccelerated and BinaryProtocol don't produce the same...
authorBryan Duxbury <bryanduxbury@apache.org>
Fri, 20 Mar 2009 02:21:05 +0000 (02:21 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Fri, 20 Mar 2009 02:21:05 +0000 (02:21 +0000)
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

index bb4f4a3..45f5a52 100644 (file)
@@ -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));
   }