diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-27 06:27:47 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-27 06:27:47 +0200 |
commit | 94434474b1c0edd25e0e2423635c6bc12e574e18 (patch) | |
tree | 260fa051878a1d015500edd0988f9bb41ce08710 /lib/efl/eet.rb | |
parent | dbab4c802acbcd62262efd44f5415285a39de011 (diff) | |
download | ffi-efl-94434474b1c0edd25e0e2423635c6bc12e574e18.zip ffi-efl-94434474b1c0edd25e0e2423635c6bc12e574e18.tar.gz |
module Efl::API renamed to Efl::FFI
Diffstat (limited to 'lib/efl/eet.rb')
-rw-r--r-- | lib/efl/eet.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/efl/eet.rb b/lib/efl/eet.rb index 4623d24..76a83cf 100644 --- a/lib/efl/eet.rb +++ b/lib/efl/eet.rb @@ -10,12 +10,12 @@ module Efl # def open path, mode=FILE_MODE_READ, &blk if blk - f = Efl::API.eet_open path, mode + f = Efl::FFI.eet_open path, mode raise Exception.new "Unable to open file #{path}" if f.nil? yield EetFile.new f - Efl::API.eet_close f + Efl::FFI.eet_close f else - f = Efl::API.eet_open path, mode + f = Efl::FFI.eet_open path, mode return EetFile.new f unless f.nil? end end @@ -29,21 +29,21 @@ module Efl private :initialize # def close - Efl::API.eet_close @ptr + Efl::FFI.eet_close @ptr @ptr=nil end # def mode_get - Efl::API.eet_mode_get @ptr + Efl::FFI.eet_mode_get @ptr end # def write key, data, compress=false - Efl::API.eet_write @ptr, key, FFI::MemoryPointer.from_string(data), data.bytesize, ( compress ? 1 : 0 ) + Efl::FFI.eet_write @ptr, key, ::FFI::MemoryPointer.from_string(data), data.bytesize, ( compress ? 1 : 0 ) end # def read key - ptr = FFI::MemoryPointer.new(:int) - data = Efl::API.eet_read @ptr, key, ptr + ptr = ::FFI::MemoryPointer.new(:int) + data = Efl::FFI.eet_read @ptr, key, ptr s = ptr.read_int ptr.free return nil if s==0 |