Module: Mesa
Branch: master
Commit: c7616ac06973a80c3c6e9def49a3fa6606ba6097
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7616ac06973a80c3c6e9def49a3fa6606ba6097

Author: Emil Velikov <emil.veli...@collabora.com>
Date:   Thu Nov 23 18:51:14 2017 +0000

gl_table.py: add extern C guard for the generated glapitable.h

The header can be included from C++, hence contents should have
appropriate notation.

Cc: mesa-sta...@lists.freedesktop.org
Cc: Dylan Baker <dy...@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
Reviewed-by: Eric Engestrom <eric.engest...@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 80a44f4848..579efa80e1 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
 
 

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

Reply via email to