summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-11-23 18:51:14 +0000
committerEmil Velikov <[email protected]>2017-11-27 19:23:05 +0000
commitc7616ac06973a80c3c6e9def49a3fa6606ba6097 (patch)
tree46bf3fefba693aa28240bae249cdb3c90ba0c97e
parent6b8909f2d19064c6dcd6ccd6a21cddf93a545c7a (diff)
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: [email protected] Cc: Dylan Baker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r--src/mapi/glapi/gen/gl_table.py8
1 files changed, 8 insertions, 0 deletions
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