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>
This commit is contained in:
committed by
Emil Velikov
parent
6b8909f2d1
commit
c7616ac069
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user