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

Dylan Baker dylan at pnwbakers.com
Thu Apr 20 15:31:24 UTC 2017


Quoting Jason Ekstrand (2017-04-19 17:17:25)
> ---
>  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

please sort the imports :)

with that minor nit:
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

>  
>  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
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170420/bb6e2412/attachment.sig>


More information about the mesa-dev mailing list