Just return earlier in that case. Also set prefix to an empty string, so
we don't get to use it undefined.
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
return
else:
print("#error unhandled type: %s" % self.type)
+ return
print(" %-36s %s%s;" % (type, self.name, dim))
+ prefix = ""
if len(self.values) > 0 and self.default == None:
if self.prefix:
prefix = self.prefix + "_"
- else:
- prefix = ""
for value in self.values:
print("#define %-40s %d" % (prefix + value.name, value.value))