In some cases gl_marshal.py generates entries with "const const" leading
to a compiler warning. This strips the superfluous const from the type
string.

Signed-off-by: Marc Dietrich <marvi...@gmx.de>
---
 src/mapi/glapi/gen/gl_marshal.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py
index 51475e17ad..e0b1d43afc 100644
--- a/src/mapi/glapi/gen/gl_marshal.py
+++ b/src/mapi/glapi/gen/gl_marshal.py
@@ -181,7 +181,7 @@ class PrintCode(gl_XML.gl_print_base):
                             p.get_base_type_string(), p.name))
                 else:
                     out('const {0} {1} = cmd->{1};'.format(
-                            p.type_string(), p.name))
+                            p.type_string().lstrip('const'), p.name))
             if func.variable_params:
                 for p in func.variable_params:
                     out('const {0} * {1};'.format(
-- 
2.12.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to