[protobuf-perl commit] r153 - trunk/perl/lib/Protobuf

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 30, 2008, 5:46:14 PM7/30/08
to protobuf-p...@googlegroups.com
Author: br...@danga.com
Date: Wed Jul 30 14:45:30 2008
New Revision: 153

Modified:
trunk/perl/lib/Protobuf/Decoder.pm

Log:
sint32 passes now. 1 test failure remaining.

Modified: trunk/perl/lib/Protobuf/Decoder.pm
==============================================================================
--- trunk/perl/lib/Protobuf/Decoder.pm (original)
+++ trunk/perl/lib/Protobuf/Decoder.pm Wed Jul 30 14:45:30 2008
@@ -62,7 +62,11 @@

sub decode_field_sint32 {
my ($class, $v) = @_;
- return Protobuf::WireFormat::zigzag_decode($v);
+ my $zd = Protobuf::WireFormat::zigzag_decode($v);
+ if (UNIVERSAL::isa($zd, "Math::BigInt")) {
+ return $zd->numify;
+ }
+ return $zd;
}

sub decode_field_sint64 {

Reply all
Reply to author
Forward
0 new messages