forked from BigfootDev/flatbuffers
Fix python generation with nested flatbuffers (#8854)
* implement fix from issue * implement actual fix
This commit is contained in:
@@ -1201,12 +1201,15 @@ class PythonGenerator : public BaseGenerator {
|
|||||||
return;
|
return;
|
||||||
} // There is no nested flatbuffer.
|
} // 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);
|
std::string qualified_name = NestedFlatbufferType(unqualified_name);
|
||||||
if (qualified_name.empty()) {
|
if (qualified_name.empty()) {
|
||||||
qualified_name = nested->constant;
|
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};
|
const ImportMapEntry import_entry = {qualified_name, unqualified_name};
|
||||||
|
|
||||||
auto& code = *code_ptr;
|
auto& code = *code_ptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user