mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-01 09:51:12 +00:00
Fix python generation with nested flatbuffers (#8854)
* implement fix from issue * implement actual fix
This commit is contained in:
parent
7e163021e5
commit
d01f20f2fb
1 changed files with 4 additions and 1 deletions
|
|
@ -1201,12 +1201,15 @@ class PythonGenerator : public BaseGenerator {
|
|||
return;
|
||||
} // There is no nested flatbuffer.
|
||||
|
||||
const std::string unqualified_name = nested->constant;
|
||||
std::string unqualified_name = nested->constant;
|
||||
std::string qualified_name = NestedFlatbufferType(unqualified_name);
|
||||
if (qualified_name.empty()) {
|
||||
qualified_name = nested->constant;
|
||||
}
|
||||
|
||||
// name may be partially qualified -- need to get the true unqualified name
|
||||
unqualified_name = namer_.Denamespace(qualified_name);
|
||||
|
||||
const ImportMapEntry import_entry = {qualified_name, unqualified_name};
|
||||
|
||||
auto& code = *code_ptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue