VirtualBox

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

最後變更 在這個檔案從65902是 63942,由 vboxsync 提交於 8 年 前

OpenGL: fixed the most annoying coding style flaws, mainly removing spaces after '(' and before ')', no semantic change

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.1 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
6from __future__ import print_function
7import sys
8
9import apiutil
10
11
12apiutil.CopyrightC()
13
14print("""
15/* DO NOT EDIT - THIS FILE GENERATED BY THE tsfuncs.py SCRIPT */
16
17#include "stub.h"
18""")
19
20keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
21
22for func_name in keys:
23 return_type = apiutil.ReturnType(func_name)
24 params = apiutil.Parameters(func_name)
25
26 print("static %s SPULOAD_APIENTRY ts_%s(%s)" % (return_type, func_name, apiutil.MakeDeclarationString(params) ))
27 print("{")
28 print("\tSPUDispatchTable *tab = (SPUDispatchTable *) crGetTSD(&stub.dispatchTSD);")
29
30 if return_type != "void":
31 print("\treturn ", end=" ")
32
33 print("\ttab->%s(%s);" % (func_name, apiutil.MakeCallString(params)))
34 print("}")
35 print("")
36
37
38print("SPUDispatchTable stubThreadsafeDispatch = {")
39
40for func_name in keys:
41 print("\tts_%s," % func_name)
42
43print("\tNULL, /* copyList */")
44print("\tNULL, /* copy_of */")
45print("\t0, /* mark */")
46print("\tNULL /* server */")
47print("};")
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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