summaryrefslogtreecommitdiffstats
path: root/tools/genruby.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-08-14 10:02:01 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-08-14 10:02:01 +0200
commit9c04104fdb3889f8096fcc38718551961932c802 (patch)
tree3ca560531648118e7f87db0f0494a3754c0c98b2 /tools/genruby.rb
parent06e6afbce232c4c0b53d1e1bba95a52652c8c23c (diff)
downloadffi-efl-9c04104fdb3889f8096fcc38718551961932c802.zip
ffi-efl-9c04104fdb3889f8096fcc38718551961932c802.tar.gz
handle struct keyword in type definitions
Diffstat (limited to 'tools/genruby.rb')
-rwxr-xr-xtools/genruby.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/genruby.rb b/tools/genruby.rb
index f844cc0..4b9582f 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -109,7 +109,7 @@ TYPES_USAGE = {}
#
def set_type t, v, cb=false
return 'bool' if t =~/Eina_Bool/
- v = v.downcase.gsub(/(const|enum|union)/,'').strip
+ v = v.downcase.gsub(/(const|struct|enum|union)/,'').strip
if not TYPES[t].nil?
puts "type already exists >#{t}< #{v}"
exit 1
@@ -128,7 +128,7 @@ def set_type t, v, cb=false
end
#
def get_type t
- k = t.gsub(/(const|enum|union)/, '').strip
+ k = t.gsub(/(const|struct|enum|union)/, '').strip
k.sub!(/\*/,' *') if k=~/\w+\*/
r = TYPES[k]
if r.nil?