diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-04 23:42:07 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-04 23:42:07 +0200 |
commit | e4baccaefd209a25daa3ff8d5277fe86aca1d379 (patch) | |
tree | eb2744b7a8624a7538cb0224d40879074c819653 /tools | |
parent | 3974ea1fb3734cbf4150c759eebdf8a93d77dc8b (diff) | |
download | ffi-efl-seperate-natives.zip ffi-efl-seperate-natives.tar.gz |
FFI are in separate namespaces (Efl::Evas::Native), ruby classes are in upper level (Efl::Evas)seperate-natives
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 # |