Added support for long type to sprint_varx.
Change-Id: Ia9f710f59898d335f1e9701d5f7876bbbbee26ee
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_print.py b/lib/gen_print.py
index ab7fdc6..90f78be 100755
--- a/lib/gen_print.py
+++ b/lib/gen_print.py
@@ -579,7 +579,7 @@
"""
# Determine the type
- if type(var_value) in (int, float, bool, str, unicode) \
+ if type(var_value) in (int, long, float, bool, str, unicode) \
or var_value is None:
# The data type is simple in the sense that it has no subordinate
# parts.
@@ -592,7 +592,10 @@
if var_value == "":
var_value = "<blank>"
else:
- value_format = "0x%08x"
+ if type(var_value) is long or var_value >= 0x100000000:
+ value_format = "0x%16x"
+ else:
+ value_format = "0x%08x"
else:
value_format = "%s"
format_string = "%" + str(loc_col1_indent) + "s%-" \