aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen/gl_table.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/gl_table.py')
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_table.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py
index a0ae4c39a..13f6d787d 100644
--- a/mesalib/src/mapi/glapi/gen/gl_table.py
+++ b/mesalib/src/mapi/glapi/gen/gl_table.py
@@ -87,6 +87,7 @@ class PrintRemapTable(gl_XML.gl_print_base):
def printRealHeader(self):
print """
+#include "glapitable.h"
/**
* \\file main/dispatch.h
* Macros for handling GL dispatch tables.
@@ -107,6 +108,11 @@ class PrintRemapTable(gl_XML.gl_print_base):
return
def printBody(self, api):
+ print '#ifdef _MSC_VER'
+ print '#ifndef INLINE'
+ print '#define INLINE __inline'
+ print '#endif'
+ print '#endif'
print '#define CALL_by_offset(disp, cast, offset, parameters) \\'
print ' (*(cast (GET_by_offset(disp, offset)))) parameters'
print '#define GET_by_offset(disp, offset) \\'
@@ -189,11 +195,11 @@ class PrintRemapTable(gl_XML.gl_print_base):
print 'typedef %s (GLAPIENTRYP _glptr_%s)(%s);' % (f.return_type, f.name, arg_string)
print '#define CALL_%s(disp, parameters) \\' % (f.name)
print ' (* GET_%s(disp)) parameters' % (f.name)
- print 'static inline _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name)
+ print 'static INLINE _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name)
print ' return (_glptr_%s) (GET_by_offset(disp, _gloffset_%s));' % (f.name, f.name)
print '}'
print
- print 'static inline void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string)
+ print 'static INLINE void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string)
print ' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name)
print '}'
print