[Mesa-dev] [PATCH] gl_table.py: add extern C guard for the generated glapitable.h

Eric Engestrom eric.engestrom at imgtec.com
Fri Nov 24 10:29:47 UTC 2017


On Thursday, 2017-11-23 19:01:22 +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Cc: mesa-stable at lists.freedesktop.org
> Cc: Dylan Baker <dylan at pnwbakers.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>

Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

> ---
>  src/mapi/glapi/gen/gl_table.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py
> index 80a44f48488..579efa80e17 100644
> --- a/src/mapi/glapi/gen/gl_table.py
> +++ b/src/mapi/glapi/gen/gl_table.py
> @@ -58,12 +58,20 @@ class PrintGlTable(gl_XML.gl_print_base):
>          print '#endif'
>          print ''
>          print ''
> +        print '#ifdef __cplusplus'
> +        print 'extern "C" {'
> +        print '#endif'
> +        print ''
>          print 'struct _glapi_table'
>          print '{'
>          return
>  
>      def printRealFooter(self):
>          print '};'
> +        print ''
> +        print '#ifdef __cplusplus'
> +        print '}'
> +        print '#endif'
>          return
>  
>  
> -- 
> 2.15.0
> 


More information about the mesa-dev mailing list