Changeset 19373
- Timestamp:
- 09/16/08 20:39:09 (4 months ago)
- Location:
- lang/php/Net_TokyoTyrant/trunk
- Files:
-
- 2 modified
-
Net/TokyoTyrant.php (modified) (2 diffs)
-
tests/tmp_test.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/php/Net_TokyoTyrant/trunk/Net/TokyoTyrant.php
r19048 r19373 70 70 continue; 71 71 } 72 72 73 73 $int .= pack('N', $value); 74 74 } … … 242 242 } 243 243 244 public function addint($key, $num) 245 { 246 $cmd = pack('c*', 0xC8,0x60); 247 $this->_doRequest($cmd, array($key, $num)); 248 if ($this->_getResponse() === false) { 249 return false; 250 } 251 return $this->_getInt4(); 252 } 253 254 public function adddouble($key, $integ, $fract) 255 { 256 $cmd = pack('c*', 0xC8,0x61); 257 $this->_doRequest($cmd, array($key, $intteg, $fract)); 258 if ($this->_getResponse() === false) { 259 return false; 260 } 261 return array($this->_getInt8(), $this->_getInt8()); 262 } 263 244 264 public function vsize($key) 245 265 { -
lang/php/Net_TokyoTyrant/trunk/tests/tmp_test.php
r19048 r19373 7 7 $key2 = 'keytest2'; 8 8 $data2 = 'the test2 data'; 9 $count_key = 'count'; 9 10 $error = null; 10 11 try { … … 63 64 assert($tt->iternext() === false); 64 65 66 assert($tt->addint($count_key, 1) === 1); 67 assert($tt->addint($count_key, 2) === 3); 68 assert($tt->addint($count_key, -2) === 1); 69 65 70 66 71 assert($tt->sync() === true);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)