Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
82a71b18
Commit
82a71b18
authored
Aug 28, 2015
by
Melvi Ts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python: Fix potential code generation issue of documentation comment.
parent
aeff09d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
idl_gen_python.cpp
src/idl_gen_python.cpp
+1
-3
monster_test.fbs
tests/monster_test.fbs
+1
-0
No files found.
src/idl_gen_python.cpp
View file @
82a71b18
...
@@ -493,7 +493,7 @@ static void GenStruct(const StructDef &struct_def,
...
@@ -493,7 +493,7 @@ static void GenStruct(const StructDef &struct_def,
StructDef
*
root_struct_def
)
{
StructDef
*
root_struct_def
)
{
if
(
struct_def
.
generated
)
return
;
if
(
struct_def
.
generated
)
return
;
GenComment
(
struct_def
.
doc_comment
,
code_ptr
,
nullptr
);
GenComment
(
struct_def
.
doc_comment
,
code_ptr
,
nullptr
,
"# "
);
BeginClass
(
struct_def
,
code_ptr
);
BeginClass
(
struct_def
,
code_ptr
);
if
(
&
struct_def
==
root_struct_def
)
{
if
(
&
struct_def
==
root_struct_def
)
{
// Generate a special accessor for the table that has been declared as
// Generate a special accessor for the table that has been declared as
...
@@ -660,5 +660,3 @@ bool GeneratePython(const Parser &parser,
...
@@ -660,5 +660,3 @@ bool GeneratePython(const Parser &parser,
}
}
}
// namespace flatbuffers
}
// namespace flatbuffers
tests/monster_test.fbs
View file @
82a71b18
...
@@ -31,6 +31,7 @@ table Stat {
...
@@ -31,6 +31,7 @@ table Stat {
count:ushort;
count:ushort;
}
}
/// an example documentation comment: monster object
table Monster {
table Monster {
pos:Vec3 (id: 0);
pos:Vec3 (id: 0);
hp:short = 100 (id: 2);
hp:short = 100 (id: 2);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment