[Mesa-dev] [PATCH 1/3] genxml/pack: Allow hex values in the XML

Jason Ekstrand jason at jlekstrand.net
Thu Apr 20 00:17:25 UTC 2017


---
 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 2a70945..5b55143 100644
--- a/src/intel/genxml/gen_pack_header.py
+++ b/src/intel/genxml/gen_pack_header.py
@@ -7,6 +7,7 @@ import xml.parsers.expat
 import re
 import sys
 import copy
+import ast
 
 license =  """/*
  * Copyright (C) 2016 Intel Corporation
@@ -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.5.0.400.gff86faf



More information about the mesa-dev mailing list