Show
Ignore:
Timestamp:
09/16/08 21:07:17 (4 months ago)
Author:
cocoiti
Message:

putint, getintを追加したなぜかこっちだけリトルエンディアンな謎

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/Net_TokyoTyrant/trunk/Net/TokyoTyrant.php

    r19373 r19380  
    251251        return $this->_getInt4(); 
    252252    } 
    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 
    254270    public function adddouble($key, $integ, $fract) 
    255271    {