Fix issue #4389, if field is ommitted the return type is the same for… (#4444)

* Fix issue #4389, if field is ommitted the return type is the same for python generator

* Fix issue #4389, bytes is returned when field is omitted

* Fix issue #4389, added generated python code after generator modification
This commit is contained in:
Dariusz Ostolski
2017-10-05 23:07:42 +02:00
committed by Wouter van Oortmerssen
parent 971a68110e
commit 5e4739184f
4 changed files with 4 additions and 4 deletions

View File

@@ -198,7 +198,7 @@ static void GetStringField(const StructDef &struct_def,
code += OffsetPrefix(field);
code += Indent + Indent + Indent + "return " + GenGetter(field.value.type);
code += "o + self._tab.Pos)\n";
code += Indent + Indent + "return \"\"\n\n";
code += Indent + Indent + "return bytes()\n\n";
}
// Get the value of a union from an object.