[Mesa-dev] [PATCH] strip double const from generated file
Tapani Pälli
tapani.palli at intel.com
Thu May 4 11:00:38 UTC 2017
I filed a bug on this, my attempt caused some compilation warnings, see:
https://bugs.freedesktop.org/show_bug.cgi?id=100227
On 05/04/2017 01:16 PM, Marc Dietrich wrote:
> 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 <marvin24 at 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(
More information about the mesa-dev
mailing list