diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-19 17:47:15 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-19 17:47:15 +0200 |
commit | 627218f5cad494dcd8201ea03c22de2821e40d6d (patch) | |
tree | c929df7ed3cab6da046e4132bb9844edde32c194 /tools/genruby.rb | |
parent | 66fd74dd01c86cafcdf20f8a4d95b4cefc089b74 (diff) | |
download | ffi-efl-627218f5cad494dcd8201ea03c22de2821e40d6d.zip ffi-efl-627218f5cad494dcd8201ea03c22de2821e40d6d.tar.gz |
genruby, add ugly Eina_Bool tricks
Diffstat (limited to 'tools/genruby.rb')
-rwxr-xr-x | tools/genruby.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/genruby.rb b/tools/genruby.rb index 4d08840..032fdc8 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -80,6 +80,8 @@ TYPES = { 'struct timeval *' => ':pointer', 'struct sockaddr *' => ':pointer', # E17 BASE TYPES + 'Eina_Bool' => ':eina_bool', + 'Eina_Bool *' => ':eina_bool_p', 'Eina_List' => ':eina_list', 'Eina_List *' => ':eina_list_p', 'Eina_Hash' => ':eina_hash', @@ -91,6 +93,7 @@ TYPES = { } # def set_type t, v, cb=false + return 'bool' if t =~/Eina_Bool/ v = v.downcase.gsub(/(const|enum|union)/,'').strip if not TYPES[t].nil? puts "type already exists >#{t}< #{v}" @@ -179,6 +182,7 @@ def gen_typedefs path, indent v = set_type t, v r << indent+"# #{l}\n" r << indent+"typedef :#{v}, :#{t.downcase}\n" + r << indent+"typedef :pointer, :#{t.downcase}_p\n" if t=~/Eina_Bool/ else r << indent+"# #{l}\n#{indent}# FIXME\n" next |