On 04.05.2017 13:25, Marc Dietrich wrote:
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 ;-)

I think Gustaw's comment to that bug report is correct. The const needs to be moved to after the type.

Cheers,
Nicolai


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 <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(



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



--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to