diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/genruby.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/genruby.rb b/tools/genruby.rb index 4177447..497a855 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -2,7 +2,7 @@ # -*- coding: UTF-8 -*- # path = File.dirname __FILE__ -lib_path = File.join path, '..', 'lib', 'efl', 'ffi' +lib_path = File.join path, '..', 'lib', 'efl', 'native' # # header, module name, fct prefix, lib libraries = [ @@ -25,7 +25,7 @@ libraries = [ [ 'Elementary.h', 'Elm', 'elm', 'libelementary-ver-pre-svn-09.so.0', 'elementary.rb' ], ] # -INDENT=' '*8 +INDENT=' '*12 # HEADER =<<-EOF #! /usr/bin/env ruby @@ -37,16 +37,19 @@ module Efl # module MNAME # - extend Efl::FFIHelper - # def self.method_missing m, *args, &block sym = 'FCT_PREFIX_'+m.to_s - raise NameError.new "\#{self.name}.\#{sym} (\#{m})" if not self.respond_to? sym - self.module_eval "def self.\#{m} *args, █ r=self.\#{sym}(*args); yield r if block_given?; r; end" - self.send sym, *args, &block + raise NameError.new "\#{self.name}.\#{sym} (\#{m})" if not Efl::MNAME::Native.respond_to? sym + self.module_eval "def self.\#{m} *args, █ r=Efl::MNAME::Native.\#{sym}(*args); yield r if block_given?; r; end" + self.send m, *args, &block end + # + module Native + # + extend Efl::FFIHelper EOF FOOTER =<<-EOF + end end end # |