2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

python: properly initialize string length on 64bit systems.

types.py was initializing max string length to 2^64 - 1 instead of
UINT_MAX on 64 bit systems.  This commit fixes that problem.
This commit is contained in:
Ethan Jackson
2011-01-03 12:27:50 -08:00
parent 0fee489f84
commit 5601839c45

View File

@@ -358,7 +358,7 @@ class BaseType(object):
elif self.type == StringType:
if self.min_length is not None:
stmts.append('%s.u.string.minLen = %d;' % (var, self.min_length))
if self.max_length is not None:
if self.max_length != sys.maxint:
stmts.append('%s.u.string.maxLen = %d;' % (var, self.max_length))
elif self.type == UuidType:
if self.ref_table is not None: