don't expand COMMON*DEFS for executor

This commit is contained in:
Wolfgang Thaller 2019-09-22 23:21:59 +02:00
parent 8580ac4ce4
commit d6020b69aa
2 changed files with 7 additions and 1 deletions

View file

@ -5,6 +5,7 @@ class ExecutorGenerator < Generator
super
@need_guest = false
@noguest_types = Set.new(["void"])
@expand_common = false
end
def need_guest

View file

@ -16,6 +16,7 @@ class Generator
"double" => 8
}
@fancy_comments = false
@expand_common = true
end
def size_of_type(type)
return nil if not type
@ -99,7 +100,11 @@ class Generator
declare_members sub
@out << "} " << member["name"] << ";"
elsif member["common"]
declare_members($global_name_map[member["common"]]["common"]["members"])
if @expand_common then
declare_members($global_name_map[member["common"]]["common"]["members"])
else
@out << member["common"] << ";"
end
else
@out << decl(member["type"], member["name"]) << ";"
@out << " // " << member["comment"].rstrip << "\n" if member["comment"]