projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8c16de
)
[Go] Add missing namespace when using Object API (#6633)
author
mogemimi
<mogemimi@enginetrouble.net>
Mon, 10 May 2021 17:52:10 +0000
(
02:52
+0900)
committer
GitHub
<noreply@github.com>
Mon, 10 May 2021 17:52:10 +0000
(10:52 -0700)
src/idl_gen_go.cpp
patch
|
blob
|
history
diff --git
a/src/idl_gen_go.cpp
b/src/idl_gen_go.cpp
index
5dfd8c8
..
867f402
100644
(file)
--- a/
src/idl_gen_go.cpp
+++ b/
src/idl_gen_go.cpp
@@
-1011,7
+1011,9
@@
class GoGenerator : public BaseGenerator {
NativeType(field.value.type) + ", " + length + ")\n";
code += "\tfor j := 0; j < " + length + "; j++ {\n";
if (field.value.type.element == BASE_TYPE_STRUCT) {
- code += "\t\tx := " + field.value.type.struct_def->name + "{}\n";
+ code += "\t\tx := " +
+ WrapInNameSpaceAndTrack(*field.value.type.struct_def) +
+ "{}\n";
code += "\t\trcv." + field_name_camel + "(&x, j)\n";
}
code += "\t\tt." + field_name_camel + "[j] = ";