diff scripts/dgen.rb @ 7:9e67a1122e85

Fixed a bug that caused some types to be empty
author Jacob Carlborg <doob@me.com>
date Thu, 09 Jul 2009 21:17:39 +0200
parents 5a1a6afbfe3a
children 2c0fd7bb4de6
line wrap: on
line diff
--- a/scripts/dgen.rb	Wed Jul 08 14:29:59 2009 +0200
+++ b/scripts/dgen.rb	Thu Jul 09 21:17:39 2009 +0200
@@ -1132,7 +1132,7 @@
 				str << type
 				str << " "
 				str << get_identifier(typedef.name).nl
-			end
+			end unless type.nil?
 		end
 
 		str << "\n"
@@ -1324,7 +1324,7 @@
 		when "^"
 			get_struct_type(type[1 .. -1], type64, declared_type)
 			hash = get_struct_type(type[1 .. -1], type64, declared_type)
-			hash[:name].dup << "*"
+			hash[:name].dup << "*" unless hash.nil?
 			return hash
 		end
 	end
@@ -1460,7 +1460,7 @@
 			when "return"; return true
 
 			when "scope"; return true
-			when "shared"; return true;s
+			when "shared"; return true
 			when "short"; return true
 			when "static"; return true
 			when "struct"; return true