Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 14, 2010
Yann Kerhervé yannk Fixes a couple of incorrect deference (THRIFT-758)
This is a nasty error that is triggered during exception, leaving
the user clueless about the error since she gets a Perl error
instead:

"Can't use string ("0") as a SCALAR ref while "strict refs" in use"

For instance:
http://stackoverflow.com/questions/2488783/why-do-i-get-an-error-when-inserting-rows-with-netcassandraeasy-and-cassandra
4f54015
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/perl/lib/Thrift.pm
8 lib/perl/lib/Thrift.pm
View
@@ -93,11 +93,11 @@ sub read {
my $ftype = 0;
my $fid = 0;
- $xfer += $input->readStructBegin($fname);
+ $xfer += $input->readStructBegin(\$fname);
while (1)
{
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
if ($ftype == TType::STOP) {
last; next;
}
@@ -107,7 +107,7 @@ sub read {
/1/ && do{
if ($ftype == TType::STRING) {
- $xfer += $input->readString($self->{message});
+ $xfer += $input->readString(\$self->{message});
} else {
$xfer += $input->skip($ftype);
}
@@ -117,7 +117,7 @@ sub read {
/2/ && do{
if ($ftype == TType::I32) {
- $xfer += $input->readI32($self->{code});
+ $xfer += $input->readI32(\$self->{code});
} else {
$xfer += $input->skip($ftype);
}

No commit comments for this range

Something went wrong with that request. Please try again.