msg generated print support boolean

This commit is contained in:
Daniel Agar 2018-07-15 14:12:39 -04:00 committed by Lorenz Meier
parent bb49ac1933
commit c199ca5193

View File

@ -234,6 +234,9 @@ def print_field(field):
# cast double
if field.type == "float32":
field_name = "(double)" + field_name
elif field.type == "bool":
c_type = '%s'
field_name = "(" + field_name + " ? \"True\" : \"False\")"
else:
print("printf(\"\\n\\t" + field.name + "\");")