VirtualBox

Ignore:
Timestamp:
Sep 22, 2016 7:58:05 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
110825
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/GuestHost/OpenGL/util/debug_opcodes.py

    r15532 r63939  
    44# See the file LICENSE.txt for information on redistributing this software.
    55
     6from __future__ import print_function
    67import sys;
    7 import cPickle;
    88import string;
    99import re;
     
    1313apiutil.CopyrightC()
    1414
    15 print """
     15print("""
    1616#include "cr_debugopcodes.h"
    1717#include <stdio.h>
    18 """
     18""")
    1919
    20 print """void crDebugOpcodes( FILE *fp, unsigned char *ptr, unsigned int num_opcodes )
     20print("""void crDebugOpcodes( FILE *fp, unsigned char *ptr, unsigned int num_opcodes )
    2121{
    2222\tunsigned int i;
     
    2525\t\tswitch(*(ptr--))
    2626\t\t{
    27 """
     27""")
    2828
    2929keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
     
    3232for func_name in keys:
    3333        if "pack" in apiutil.ChromiumProps(func_name):
    34                 print '\t\tcase %s:' % apiutil.OpcodeName( func_name )
    35                 print '\t\t\tfprintf( fp, "%s\\n" ); ' % apiutil.OpcodeName( func_name )
    36                 print '\t\t\tbreak;'
     34                print('\t\tcase %s:' % apiutil.OpcodeName( func_name ))
     35                print('\t\t\tfprintf( fp, "%s\\n" ); ' % apiutil.OpcodeName( func_name ))
     36                print( '\t\t\tbreak;')
    3737
    38 print """
     38print("""
    3939\t\t}
    4040\t}
    4141}
    42 """
     42""")
Note: See TracChangeset for help on using the changeset viewer.

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