Changeset 63939 in vbox for trunk/src/VBox/Additions/common/crOpenGL/NULLfuncs.py
- Timestamp:
- Sep 22, 2016 7:58:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/NULLfuncs.py
r16381 r63939 5 5 6 6 7 from __future__ import print_function 7 8 import sys 8 9 … … 13 14 apiutil.CopyrightC() 14 15 15 print 16 print(""" 16 17 /* DO NOT EDIT - THIS FILE GENERATED BY THE NULLfuncs.py SCRIPT */ 17 18 18 19 #include "cr_error.h" 19 20 #include "stub.h" 20 """ 21 """) 21 22 22 23 for func_name in keys: … … 24 25 params = apiutil.Parameters(func_name) 25 26 26 print "static %s SPULOAD_APIENTRY NULL_%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params))27 print "{"28 print "\t/* do nothing */"29 print "\tcrWarning(\"YOU ARE CALLING A NULLED FUNCTION (%s)\");" % func_name27 print("static %s SPULOAD_APIENTRY NULL_%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params))) 28 print("{") 29 print("\t/* do nothing */") 30 print("\tcrWarning(\"YOU ARE CALLING A NULLED FUNCTION (%s)\");" % func_name) 30 31 for (name, type, vecSize) in params: 31 print "\t(void) %s;" % name32 print("\t(void) %s;" % name) 32 33 if return_type != "void": 33 print "\treturn 0;"34 print "}"35 print ""34 print("\treturn 0;") 35 print("}") 36 print("") 36 37 37 38 38 print "DECLEXPORT(SPUDispatchTable) stubNULLDispatch = {"39 print("DECLEXPORT(SPUDispatchTable) stubNULLDispatch = {") 39 40 for func_name in keys: 40 print "\tNULL_%s," % (func_name)41 print "\tNULL, /* copyList */"42 print "\tNULL, /* copy_of */"43 print "\t0, /* mark */"44 print "\tNULL /* server */"45 print "};"41 print("\tNULL_%s," % (func_name)) 42 print("\tNULL, /* copyList */") 43 print("\tNULL, /* copy_of */") 44 print("\t0, /* mark */") 45 print("\tNULL /* server */") 46 print("};") 46 47 47 print ""48 print "/* Declare and initialize the glim dispatch table here so that we */"49 print "/* can initialize all entries to no-op routines. */"50 print "SPUDispatchTable glim = {"48 print("") 49 print("/* Declare and initialize the glim dispatch table here so that we */") 50 print("/* can initialize all entries to no-op routines. */") 51 print("SPUDispatchTable glim = {") 51 52 for func_name in keys: 52 print "\tNULL_%s," % (func_name)53 print "\tNULL, /* copyList */"54 print "\tNULL, /* copy_of */"55 print "\t0, /* mark */"56 print "\tNULL /* server */"57 print "};"53 print("\tNULL_%s," % (func_name)) 54 print("\tNULL, /* copyList */") 55 print("\tNULL, /* copy_of */") 56 print("\t0, /* mark */") 57 print("\tNULL /* server */") 58 print("};")
Note:
See TracChangeset
for help on using the changeset viewer.