summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-23 16:15:21 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-23 16:15:21 +0100
commitcb92de2b2595e0aba5ac34efc98fa3fef6d94487 (patch)
treecbd2dbaa7f5d30f46fb3f0f095779abbe361731f /tools
parenta6b423787b9d9df618d89468e2573b4d598f011e (diff)
downloadffi-efl-cb92de2b2595e0aba5ac34efc98fa3fef6d94487.zip
ffi-efl-cb92de2b2595e0aba5ac34efc98fa3fef6d94487.tar.gz
tools/genruby: ooops fix gen_enums, must use given values
Diffstat (limited to 'tools')
-rwxr-xr-xtools/genruby.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/genruby.rb b/tools/genruby.rb
index baca539..f583677 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -166,9 +166,12 @@ def gen_enums path, indent
sym=':'+s.downcase
if h.has_key? v
h[s]=h[v]
- else
+ elsif v.nil?
h[s]=i
i+=1
+ else
+ h[s]=v
+ i=v.to_i+1
end
end
args = syms.inject(''){|r,s| r+=":#{s.strip.downcase}, #{h[s]}, " }