[Piglit] [v9 01/13] glapi: fix parsing of extensions containing string "EGL_"

Chad Versace chad.versace at linux.intel.com
Mon Aug 19 10:21:06 PDT 2013


On 08/09/2013 03:42 AM, Topi Pohjolainen wrote:
> Category for 'EGLImageTargetTexture2DOES' becomes 'GL_OES_EGL_image'
> instead of 'GL_OES_Eimage'.
>
> v2 (Chad): replace first occurence explicitly
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>   glapi/parse_glspec.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/glapi/parse_glspec.py b/glapi/parse_glspec.py
> index 0507f80..2a8f73a 100644
> --- a/glapi/parse_glspec.py
> +++ b/glapi/parse_glspec.py
> @@ -461,7 +461,8 @@ class Api(object):
>               else:
>                   m = re.match(r'/\* (GL_.*) \*/', line)
>                   if m:
> -                    category = m.group(1).replace('GL_', '')
> +                    # replace only the first occurence of 'GL_'
> +                    category = m.group(1).replace('GL_', '', 1)
>
>               m = re.match(r'GL_APICALL', line)
>               if m:

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>



More information about the Piglit mailing list