search for: le_to_ui

Displaying 1 result from an estimated 1 matches for "le_to_ui".

2009 Nov 07
1
Fwd: [PATCH (geoip)] use IO.pread from the io-extra lib if possible
...seek(@record_length * 2 * offset); - @file.read(@record_length * 2); - } + off = @record_length * 2 * offset + buf = atomic_read(@record_length * 2, off) buf.slice!(0... at record_length) if ((ipnum & mask) != 0) offset = le_to_ui(buf[0... at record_length].unpack("C*")) return offset if (offset >= @databaseSegments[0]) @@ -761,6 +756,22 @@ class GeoIP def le_to_ui(s) be_to_ui(s.reverse) end + + # reads +length+ bytes from +offset+ as atomically as possible + # if IO.pread i...