diff options
author | Jérémy Zurcher <jeremy.zurcher@heraeus.com> | 2011-04-14 10:38:19 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy.zurcher@heraeus.com> | 2011-04-14 10:38:19 +0200 |
commit | e6f1c06f74fee4fb0c82100f61b0edf108abb1be (patch) | |
tree | 378e581aba4b2d5723cb1b79f8a689145794ce2b /lib | |
parent | 1e7bb5c2b2358188067e2af256b7b07664a5f732 (diff) | |
download | ffi-efl-e6f1c06f74fee4fb0c82100f61b0edf108abb1be.zip ffi-efl-e6f1c06f74fee4fb0c82100f61b0edf108abb1be.tar.gz |
update eina, use FFIHelper
Diffstat (limited to 'lib')
-rw-r--r-- | lib/e17/eina.rb | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/e17/eina.rb b/lib/e17/eina.rb index bdb3522..9309cfe 100644 --- a/lib/e17/eina.rb +++ b/lib/e17/eina.rb @@ -1,29 +1,24 @@ #! /usr/bin/env ruby # -*- coding: UTF-8 -*- # -require 'ffi' +require 'e17/ffi_helper' # module E17 module EINA # + extend FFIHelper extend FFI::Library # ffi_lib 'eina' - [ + # + fcts = [ [ :eina_init, [], :int], [ :eina_shutdown, [], :int], - ].each do |func| - begin - attach_function *func - rescue Object => e - puts "Could not attach #{func} #{e.message}" - end - end + ] + # + attach_fcts fcts # - class << self - alias init eina_init - alias shutdown eina_shutdown - end + create_aliases 'eina_'.length, fcts # end end |