Repository: thrift Updated Branches: refs/heads/master 25c68f45d -> eb393ac3c
THRIFT-2701 Update TCompactProtocol.php Client: PHP Patch: GitHub-User anjz <[email protected]> This closes #212 Removed `strrev` from `readDouble` and `writeDouble` functions. I found problems reading a double that was generated with the python library. Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/eb393ac3 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/eb393ac3 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/eb393ac3 Branch: refs/heads/master Commit: eb393ac3cd7aad50e65b30a110c0d40eaebf7c25 Parents: 25c68f4 Author: Jens Geyer <[email protected]> Authored: Mon Sep 29 22:25:46 2014 +0200 Committer: Jens Geyer <[email protected]> Committed: Mon Sep 29 22:47:44 2014 +0200 ---------------------------------------------------------------------- lib/php/lib/Thrift/Protocol/TCompactProtocol.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/eb393ac3/lib/php/lib/Thrift/Protocol/TCompactProtocol.php ---------------------------------------------------------------------- diff --git a/lib/php/lib/Thrift/Protocol/TCompactProtocol.php b/lib/php/lib/Thrift/Protocol/TCompactProtocol.php index 337511e..b8a71d6 100644 --- a/lib/php/lib/Thrift/Protocol/TCompactProtocol.php +++ b/lib/php/lib/Thrift/Protocol/TCompactProtocol.php @@ -309,7 +309,7 @@ class TCompactProtocol extends TProtocol { public function writeDouble($value) { $data = pack('d', $value); - $this->trans_->write(strrev($data), 8); + $this->trans_->write($data, 8); return 8; } @@ -485,7 +485,7 @@ class TCompactProtocol extends TProtocol { } public function readDouble(&$value) { - $data = strrev($this->trans_->readAll(8)); + $data = $this->trans_->readAll(8); $arr = unpack('d', $data); $value = $arr[1]; return 8;
