VirtualBox

Ignore:
Timestamp:
Sep 22, 2016 7:58:05 AM (8 years ago)
Author:
vboxsync
Message:

Build/scripts (bugref:6627): Python build scripts updated to generate the same code when used with Python 2 and 3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/windows_getprocaddress.py

    r51200 r63939  
    44# See the file LICENSE.txt for information on redistributing this software.
    55
     6from __future__ import print_function
    67import sys
    78
     
    1011apiutil.CopyrightC()
    1112
    12 print """
     13print("""
    1314/* DO NOT EDIT - THIS FILE GENERATED BY THE getprocaddress.py SCRIPT */
    1415#include "chromium.h"
     
    2425#endif
    2526
    26 """
     27""")
    2728
    28 print """
     29print("""
    2930struct name_address {
    3031  const char *name;
     
    3536
    3637static struct name_address functions[] = {
    37 """
     38""")
    3839
    3940
     
    6061    address = "cr_gl" + proc_name
    6162    if wrap:
    62         print '#ifdef CR_%s' % wrap
    63     print '\t{ "%s", (CR_PROC) %s },' % (name, address)
     63        print('#ifdef CR_%s' % wrap)
     64    print('\t{ "%s", (CR_PROC) %s },' % (name, address))
    6465    if wrap:
    65         print '#endif'
     66        print('#endif')
    6667
    6768
    68 print "\t/* Chromium binding/glue functions */"
     69print("\t/* Chromium binding/glue functions */")
    6970
    7071for func_name in keys:
     
    7576        continue
    7677    if apiutil.Category(func_name) == "Chromium":
    77         print '\t{ "cr%s", (CR_PROC) cr%s },' % (func_name, func_name)
     78        print('\t{ "cr%s", (CR_PROC) cr%s },' % (func_name, func_name))
    7879
    79 print "\t/* Windows ICD functions */"
     80print("\t/* Windows ICD functions */")
    8081
    8182for func_name in ( "CopyContext",
     
    9596    "SetContext",
    9697    "ValidateVersion"):
    97     print '\t{ "Drv%s", (CR_PROC) Drv%s },' % (func_name, func_name)
     98    print('\t{ "Drv%s", (CR_PROC) Drv%s },' % (func_name, func_name))
    9899
    99 print '\t{ "DrvGetProcAddress", (CR_PROC) wglGetProcAddress_prox },'
     100print('\t{ "DrvGetProcAddress", (CR_PROC) wglGetProcAddress_prox },')
    100101
    101 print """
     102print("""
    102103    { NULL, NULL }
    103104};
     
    149150}
    150151
    151 """
     152""")
    152153
    153154
Note: See TracChangeset for help on using the changeset viewer.

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