- Timestamp:
- 09/16/08 21:07:17 (2 months ago)
- Location:
- lang/php/Net_TokyoTyrant/trunk
- Files:
-
- 2 modified
-
Net/TokyoTyrant.php (modified) (1 diff)
-
tests/tmp_test.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/php/Net_TokyoTyrant/trunk/Net/TokyoTyrant.php
r19373 r19380 251 251 return $this->_getInt4(); 252 252 } 253 253 254 public function putint($key, $num) 255 { 256 $value = pack('V', $num); 257 return $this->put($key, $value); 258 } 259 260 public function getint($key) 261 { 262 $data = $this->get($key); 263 if ($data === false) { 264 return false; 265 } 266 $value = unpack('V', $data); 267 return $value[1]; 268 } 269 254 270 public function adddouble($key, $integ, $fract) 255 271 { -
lang/php/Net_TokyoTyrant/trunk/tests/tmp_test.php
r19373 r19380 67 67 assert($tt->addint($count_key, 2) === 3); 68 68 assert($tt->addint($count_key, -2) === 1); 69 assert($tt->putint($count_key, 1)); 70 assert($tt->getint($count_key) === 1); 71 assert($tt->addint($count_key, 1) === 2); 72 assert($tt->getint($count_key) === 2); 73 assert($tt->addint($count_key, -3) === -1); 69 74 70 75
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)