From b7a2af8e382b4f3bd8e38eb39b3eddd0d379c693 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 19 Apr 2017 16:20:44 -0700 Subject: [PATCH] genxml/pack: Allow hex values in the XML Acked-by: Kenneth Graunke Reviewed by: Iago Toral Quiroga Reviewed-by: Dylan Baker --- src/intel/genxml/gen_pack_header.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py index 2a709454af3..5228f30bd05 100644 --- a/src/intel/genxml/gen_pack_header.py +++ b/src/intel/genxml/gen_pack_header.py @@ -3,6 +3,7 @@ from __future__ import ( absolute_import, division, print_function, unicode_literals ) +import ast import xml.parsers.expat import re import sys @@ -476,7 +477,7 @@ class Group(object): class Value(object): def __init__(self, attrs): self.name = safe_name(attrs["name"]) - self.value = int(attrs["value"]) + self.value = ast.literal_eval(attrs["value"]) class Parser(object): def __init__(self): -- 2.30.2