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-stable@lists.freedesktop.org
Cc: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
(cherry picked from commit c7616ac069)
This commit is contained in:
Emil Velikov 2017-11-23 18:51:14 +00:00 committed by Emil Velikov
parent 86b35a9901
commit 4bbc0f366a

View file

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