vppapigen: crc is a negative value for some messages when using python 2.7
Type: fix Signed-off-by: Mark Nelson <manelso2@cisco.com> Change-Id: I4f121e49d3c05c21eed3fed2469bd88fc84e2271 (cherry picked from commit ea2abbaeaf34a4652e970fd1e2f60c0d377ebde4)
This commit is contained in:
Mark Nelson
committed by
Andrew Yourtchenko
parent
ea8852991f
commit
3f8c381bfc
@ -693,7 +693,7 @@ class VPPAPI(object):
|
||||
for o in objs:
|
||||
tname = o.__class__.__name__
|
||||
try:
|
||||
crc = binascii.crc32(o.crc, crc)
|
||||
crc = binascii.crc32(o.crc, crc) & 0xffffffff
|
||||
except AttributeError:
|
||||
pass
|
||||
if isinstance(o, Define):
|
||||
@ -838,7 +838,7 @@ def foldup_blocks(block, crc):
|
||||
def foldup_crcs(s):
|
||||
for f in s:
|
||||
f.crc = foldup_blocks(f.block,
|
||||
binascii.crc32(f.crc))
|
||||
binascii.crc32(f.crc) & 0xffffffff)
|
||||
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user