[Mesa-dev] [PATCH v2] mesa: Avoid set comprehension.

Dylan Baker dylan at pnwbakers.com
Wed Jul 5 18:59:05 UTC 2017


Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Quoting Vinson Lee (2017-07-05 11:38:36)
> Fix build error on CentOS 6.9 with Python 2.6.
> 
>   GEN    main/format_fallback.c
>   File "./main/format_fallback.py", line 42
>     names = {fmt.name for fmt in formats}
>                         ^
> SyntaxError: invalid syntax
> 
> Fixes: a1983223d883 ("mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]")
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/mesa/main/format_fallback.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/main/format_fallback.py b/src/mesa/main/format_fallback.py
> index e3b9916..da88bd5 100644
> --- a/src/mesa/main/format_fallback.py
> +++ b/src/mesa/main/format_fallback.py
> @@ -39,7 +39,7 @@ def parse_args():
>      return p.parse_args()
>  
>  def get_rgbx_to_rgba_map(formats):
> -    names = {fmt.name for fmt in formats}
> +    names = set(fmt.name for fmt in formats)
>  
>      for fmt in formats:
>          if not fmt.has_channel('r') or not fmt.has_channel('x'):
> -- 
> 1.7.1
> 
-------------- 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/20170705/cfa25a26/attachment.sig>


More information about the mesa-dev mailing list