intel/genxml: Support base-16 in value & start fields in gen_sort_tags.py
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 19 Apr 2019 22:31:29 +0000 (15:31 -0700)
committerPlamena Manolova <plamena.manolova@intel.com>
Mon, 29 Apr 2019 21:19:58 +0000 (21:19 +0000)
With python's int(), if the optional second parameter is 0, then
python will support the 0x prefix for hex numbers.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/genxml/gen_sort_tags.py

index 94c5ff26e0352c8d58f1f630a7e4bac1bf7242e7..66b1011cef0e21ba6886a1ceec0c2b49b53ffbb9 100644 (file)
@@ -36,10 +36,10 @@ def get_name(element):
     return element.attrib['name']
 
 def get_value(element):
-    return int(element.attrib['value'])
+    return int(element.attrib['value'], 0)
 
 def get_start(element):
-    return int(element.attrib['start'])
+    return int(element.attrib['start'], 0)
 
 
 base_types = [