Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nanopb
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
le
nanopb
Commits
8e60f24b
Commit
8e60f24b
authored
6 years ago
by
matejcik
Browse files
Options
Downloads
Patches
Plain Diff
fix test failures
parent
37cdb0df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generator/nanopb_generator.py
+5
-2
5 additions, 2 deletions
generator/nanopb_generator.py
with
5 additions
and
2 deletions
generator/nanopb_generator.py
+
5
−
2
View file @
8e60f24b
...
...
@@ -111,7 +111,7 @@ class Names:
def
__add__
(
self
,
other
):
if
isinstance
(
other
,
strtypes
):
return
Names
(
self
.
parts
+
(
other
,))
elif
isinstance
(
other
,
Name
):
elif
isinstance
(
other
,
Name
s
):
return
Names
(
self
.
parts
+
other
.
parts
)
elif
isinstance
(
other
,
tuple
):
return
Names
(
self
.
parts
+
other
)
...
...
@@ -190,10 +190,13 @@ class Enum:
self
.
options
=
enum_options
self
.
names
=
names
# by definition, `names` include this enum's name
base_name
=
Names
(
names
.
parts
[:
-
1
])
if
enum_options
.
long_names
:
self
.
values
=
[(
names
+
x
.
name
,
x
.
number
)
for
x
in
desc
.
value
]
else
:
self
.
values
=
[(
desc
.
name
+
x
.
name
,
x
.
number
)
for
x
in
desc
.
value
]
self
.
values
=
[(
base_
name
+
x
.
name
,
x
.
number
)
for
x
in
desc
.
value
]
self
.
value_longnames
=
[
self
.
names
+
x
.
name
for
x
in
desc
.
value
]
self
.
packed
=
enum_options
.
packed_enum
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment