VirtualBox

Ignore:
Timestamp:
Sep 22, 2016 7:58:05 AM (9 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/Additions/common/crOpenGL/feedback/feedback_funcs.py

    r17269 r63939  
    44# See the file LICENSE.txt for information on redistributing this software.
    55
     6from __future__ import print_function
    67import sys
    78
     
    1112apiutil.CopyrightC()
    1213
    13 print """
     14print("""
    1415/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY feedback_funcs.py SCRIPT */
    1516#ifndef CR_STATE_FEEDBACK_FUNCS_H
     
    2425#endif
    2526
    26 #define STATE_UNUSED(x) ((void)x)"""
     27#define STATE_UNUSED(x) ((void)x)""")
    2728
    2829keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
     
    3132        return_type = apiutil.ReturnType(func_name)
    3233        params = apiutil.Parameters(func_name)
    33         print '%s STATE_APIENTRY crStateFeedback%s( %s );' % (return_type, func_name, apiutil.MakeDeclarationString(params))
     34        print('%s STATE_APIENTRY crStateFeedback%s( %s );' % (return_type, func_name, apiutil.MakeDeclarationString(params)))
    3435
    3536for func_name in apiutil.AllSpecials( "select" ):
    3637        return_type = apiutil.ReturnType(func_name)
    3738        params = apiutil.Parameters(func_name)
    38         print '%s STATE_APIENTRY crStateSelect%s( %s );' % (return_type, func_name, apiutil.MakeDeclarationString(params))
    39 print '\n#endif /* CR_STATE_FEEDBACK_FUNCS_H */'
     39        print('%s STATE_APIENTRY crStateSelect%s( %s );' % (return_type, func_name, apiutil.MakeDeclarationString(params)))
     40print('\n#endif /* CR_STATE_FEEDBACK_FUNCS_H */')
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