Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/5000 )
Change subject: misc: Fix the indentation in DecodeVarint in
util/protolib.py.
......................................................................
misc: Fix the indentation in DecodeVarint in util/protolib.py.
The DecodeVarint was, as a comment describes, lifted from
google.protobuf.internal.decoder. Unfortunately, the relative indentation of
some lines was changed, changing what scope they fell under. This changed
the
behavior of the function, breaking it for multibyte and negative values.
This change restores the correct indentation and fixes the function's
behavior.
Change-Id: If645649506b0fe5a617b37a8202c9ca1c57aaf15
Reviewed-on: https://gem5-review.googlesource.com/5000
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M util/protolib.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
diff --git a/util/protolib.py b/util/protolib.py
index 47ac876..c8c6d0c 100644
--- a/util/protolib.py
+++ b/util/protolib.py
@@ -123,10 +123,10 @@
result |= ~mask
else:
result &= mask
- return (result, pos)
- shift += 7
- if shift >= 64:
- raise IOError('Too many bytes when decoding varint.')
+ return (result, pos)
+ shift += 7
+ if shift >= 64:
+ raise IOError('Too many bytes when decoding varint.')
def decodeMessage(in_file, message):
"""
--
To view, visit https://gem5-review.googlesource.com/5000
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If645649506b0fe5a617b37a8202c9ca1c57aaf15
Gerrit-Change-Number: 5000
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Hansson <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev