[Piglit] [v9 01/13] glapi: fix parsing of extensions containing string "EGL_"
Topi Pohjolainen
topi.pohjolainen at intel.com
Fri Aug 9 03:42:55 PDT 2013
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:
--
1.8.1.2
More information about the Piglit
mailing list