Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
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
protobuf
Commits
08334f09
Commit
08334f09
authored
Oct 10, 2017
by
Juan Leni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converting to immutable hashable types
parent
c4083bb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
decoder.py
python/google/protobuf/internal/decoder.py
+1
-1
encoder.py
python/google/protobuf/internal/encoder.py
+1
-1
No files found.
python/google/protobuf/internal/decoder.py
View file @
08334f09
...
...
@@ -181,7 +181,7 @@ def ReadTag(buffer, pos):
while
six
.
indexbytes
(
buffer
,
pos
)
&
0x80
:
pos
+=
1
pos
+=
1
return
(
buffer
[
start
:
pos
]
,
pos
)
return
(
six
.
binary_type
(
buffer
[
start
:
pos
])
,
pos
)
# --------------------------------------------------------------------
...
...
python/google/protobuf/internal/encoder.py
View file @
08334f09
...
...
@@ -418,7 +418,7 @@ def _VarintBytes(value):
def
TagBytes
(
field_number
,
wire_type
):
"""Encode the given tag and return the bytes. Only called at startup."""
return
_VarintBytes
(
wire_format
.
PackTag
(
field_number
,
wire_type
)
)
return
six
.
binary_type
(
_VarintBytes
(
wire_format
.
PackTag
(
field_number
,
wire_type
))
)
# --------------------------------------------------------------------
# As with sizers (see above), we have a number of common encoder
...
...
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