VirtualBox

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

最後變更 在這個檔案從43445是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.0 KB
 
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 "};"
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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