Enlightenment CVS committal
Author : nerochiaro
Project : e17
Module : proto
Dir : e17/proto/ruby-efl/src
Modified Files:
autobindings.rb
Log Message:
fixed bug when parsing a function prototype with no parameters at all.
===================================================================
RCS file: /cvs/e/e17/proto/ruby-efl/src/autobindings.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- autobindings.rb 11 Aug 2006 11:47:06 -0000 1.1
+++ autobindings.rb 31 Aug 2006 21:55:04 -0000 1.2
@@ -116,7 +116,7 @@
@types = []
@synon = {}
@decls = []
- @structs = {}
+ @structs = []
@protos = {}
tree.entities.each { |e|
@@ -177,6 +177,7 @@
# -- STRUCTURE (todo: not yet implemented)
elsif C::Struct === e.type then
@types << 'struct ' + e.type.name
+ @structs << [e.type.name, []]
# st = (@structs[e.type.name] = [])
# e.type.members.each { |mem|
# #todo: nested structures, initializers, etc
@@ -249,12 +250,13 @@
ftype = dec.indirect_type.type
f.ret = node.type.to_s # return type without
any pointer qualifier
f.ret << FunctionPtr.pointers(ftype.type)
-
+
+
f.params = []
ftype.params.each { |par|
p = FunctionPtr.parse(par)
f.params << (( p.nil? ) ? par.type.to_s : p)
- }
+ } unless ftype.params.nil?
return f
end
@@ -355,6 +357,9 @@
}
enumpool << "\tend\n"
+ struct_aliases = ''
+ @structs.each { |struct| struct_aliases << "\ttypealias '#{struct}*',
'void*'\n" }
+
base_class = nil
classes = ""
@@ -411,6 +416,10 @@
#
#{enum_aliases}
+ # Type aliases (from structures)
+ #
+#{struct_aliases}
+
# Function declarations
#
#{declarations}
@@ -453,7 +462,7 @@
o += title "[EMAIL PROTECTED] Type aliases:"
@synon.each { |syn,syn_to|
- o += "#{syn} => #{syn_to}\n"
+ o += "#{syn} => #{syn_to}\n"
}
o += "\n"
@@ -467,21 +476,22 @@
o += title "[EMAIL PROTECTED] Enumerations:"
@enums.each { |name,mem|
- o += name + "{\n"
- mem.each { |k,v|
- o += "\t\t#{k} => #{v}\n"
- }
- o += "}\n"
+ o += name + "{\n"
+ mem.each { |k,v|
+ o += "\t\t#{k} => #{v}\n"
+ }
+ o += "}\n"
}
o += "\n"
o += title "[EMAIL PROTECTED] Structures:"
@structs.each { |name, str|
- o += name + '{ '
- str.each { |mem|
- o += "\t\t#{mem[0]} => #{mem[1]}\n"
- }
- o += "}\n"
+ o += name + "\n"
+ #~ o += name + '{ '
+ #~ str.each { |mem|
+ #~ o += "\t\t#{mem[0]} => #{mem[1]}\n"
+ #~ }
+ #~ o += "}\n"
}
o += "\n"
@@ -490,14 +500,14 @@
def classgraph(k = nil, lev = 0)
if k.nil?
- k = @config[:classes][0]
- puts title('Class tree')
+ k = @config[:classes][0]
+ puts title('Class tree')
end
puts "#{''.pad(lev-1,' ')} #{k[:name]} " + ((!k[:wraps].nil?) ?
"(#{k[:wraps]})" : '')
@config[:classes].each { |sub|
- classgraph(sub, lev+1) if (sub[:child_of] == k[:name])
+ classgraph(sub, lev+1) if (sub[:child_of] == k[:name])
}
end
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs