[Mesa-dev] [PATCH] strip double const from generated file
Marc Dietrich
marvin24 at gmx.de
Thu May 4 11:25:16 UTC 2017
Am Donnerstag, 4. Mai 2017, 13:00:38 CEST schrieben Sie:
> I filed a bug on this, my attempt caused some compilation warnings, see:
> https://bugs.freedesktop.org/show_bug.cgi?id=100227
I don't see warnings with my patch. However, I also don't understand the
origin of the problem ;-)
Marc
>
> 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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170504/ed40745f/attachment.sig>
More information about the mesa-dev
mailing list