Modernize Python print syntax to appease external codebase.
This commit is contained in:
@@ -28,10 +28,10 @@ from datetime import datetime
|
||||
|
||||
def printApis(gl_apis):
|
||||
for api in gl_apis:
|
||||
print '%s\t%s' % (api['api'], api['name'])
|
||||
print('%s\t%s' % (api['api'], api['name']))
|
||||
|
||||
def parseFunctions(include_file, matcher):
|
||||
print 'Parsing header %s...' % include_file
|
||||
print('Parsing header %s...' % include_file)
|
||||
regex = re.compile(matcher)
|
||||
|
||||
functions = []
|
||||
@@ -49,7 +49,7 @@ def generateHeader(api, functions, include_dir, output_dir):
|
||||
gl_suffix = '_gl_' + suffix.lower() if len(suffix) > 0 else ''
|
||||
src_file = os.path.join(include_dir, 'bluegl', 'BlueGL%s.h' % suffix)
|
||||
|
||||
print 'Generating public header %s...' % src_file
|
||||
print('Generating public header %s...' % src_file)
|
||||
|
||||
headers = ''
|
||||
if len(api['defines']) > 0:
|
||||
@@ -277,7 +277,7 @@ extrn __blue_gl%(suffix)s_%(function)s: qword
|
||||
|
||||
for platform in platforms:
|
||||
src_file = os.path.join(output_dir, 'BlueGL%s%sImpl.S' % (suffix, platform))
|
||||
print 'Generating proxy %s...' % src_file
|
||||
print('Generating proxy %s...' % src_file)
|
||||
|
||||
with open(src_file, 'w') as file:
|
||||
file.write(osSpecificHeader[platform])
|
||||
@@ -291,7 +291,7 @@ def generateSource(api, functions, output_dir):
|
||||
gl_suffix = '_gl_' + suffix.lower() if len(suffix) > 0 else ''
|
||||
src_file = os.path.join(output_dir, 'private_BlueGL%s.h' % suffix)
|
||||
|
||||
print 'Generating source %s...' % src_file
|
||||
print('Generating source %s...' % src_file)
|
||||
|
||||
header = '''/*
|
||||
* Copyright (C) %(year)d The Android Open Source Project
|
||||
@@ -360,7 +360,7 @@ def generateApis(apis, include_dir, output_dir):
|
||||
|
||||
# remove duplicates
|
||||
functions = list(set(functions))
|
||||
print 'Found %s functions' % len(functions)
|
||||
print('Found %s functions' % len(functions))
|
||||
|
||||
generateHeader(api, functions, include_dir, output_dir)
|
||||
generateProxies(api, functions, output_dir, platforms)
|
||||
|
||||
Reference in New Issue
Block a user