glthread: don't prefix variable_data with const
authorMarek Olšák <marek.olsak@amd.com>
Wed, 19 Feb 2020 20:32:35 +0000 (15:32 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 6 Mar 2020 01:06:14 +0000 (01:06 +0000)
Not all variable data that is constant is declared with const, such as
glDeletePerfMonitorsAMD.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>

src/mapi/glapi/gen/gl_marshal.py

index a994a1425bc1a19308eb9860323917020f808a2f..9d5d5ad9e2718fe1efc38a5d849648991aaf0ec1 100644 (file)
@@ -189,11 +189,11 @@ class PrintCode(gl_XML.gl_print_base):
 
             if func.variable_params:
                 for p in func.variable_params:
-                    out('const {0} * {1};'.format(
+                    out('{0} * {1};'.format(
                             p.get_base_type_string(), p.name))
                 out('const char *variable_data = (const char *) (cmd + 1);')
                 for p in func.variable_params:
-                    out('{0} = (const {1} *) variable_data;'.format(
+                    out('{0} = ({1} *) variable_data;'.format(
                             p.name, p.get_base_type_string()))
 
                     if p.img_null_flag: