From 0b6739ef8072edeac457f27434972edff14d18c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 11 Feb 2021 22:50:55 -0500 Subject: [PATCH] glthread: don't declare pointers with const in unmarshal functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so that GL functions with a non-const pointer don't print a warning when we call them, such as glGetTexImage with a PBO where the pointer is really just an offset. Reviewed-by: Zoltán Böszörményi Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- 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 95a22bd9b1b..590e036f9f8 100644 --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -251,7 +251,7 @@ class PrintCode(gl_XML.gl_print_base): p_decl = '{0} {1} = cmd->{1};'.format( p.type_string(), p.name) - if not p_decl.startswith('const '): + if not p_decl.startswith('const ') and p.count: # Declare all local function variables as const, even if # the original parameter is not const. p_decl = 'const ' + p_decl