VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/tsfuncs.py@ 48999

Last change on this file since 48999 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1# Copyright (c) 2001, Stanford University
2# All rights reserved.
3#
4# See the file LICENSE.txt for information on redistributing this software.
5
6import sys
7
8import apiutil
9
10
11apiutil.CopyrightC()
12
13print """
14/* DO NOT EDIT - THIS FILE GENERATED BY THE tsfuncs.py SCRIPT */
15
16#include "stub.h"
17"""
18
19keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
20
21for func_name in keys:
22 return_type = apiutil.ReturnType(func_name)
23 params = apiutil.Parameters(func_name)
24
25 print "static %s SPULOAD_APIENTRY ts_%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params) )
26 print "{"
27 print "\tSPUDispatchTable *tab = (SPUDispatchTable *) crGetTSD(&stub.dispatchTSD);"
28
29 if return_type != "void":
30 print "\treturn ",
31
32 print "\ttab->%s( %s );" % (func_name, apiutil.MakeCallString(params))
33 print "}"
34 print ""
35
36
37print "SPUDispatchTable stubThreadsafeDispatch = {"
38
39for func_name in keys:
40 print "\tts_%s," % func_name
41
42print "\tNULL, /* copyList */"
43print "\tNULL, /* copy_of */"
44print "\t0, /* mark */"
45print "\tNULL /* server */"
46print "};"
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette