From 20dadf06f1399fc03aaa7c8796daaf237f96416d Mon Sep 17 00:00:00 2001 From: Philip Rideout Date: Thu, 18 Feb 2021 13:31:02 -0800 Subject: [PATCH] Modernize Python print syntax to appease external codebase. --- libs/bluegl/bluegl-gen.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/bluegl/bluegl-gen.py b/libs/bluegl/bluegl-gen.py index ba676c4ded..be762ee82b 100755 --- a/libs/bluegl/bluegl-gen.py +++ b/libs/bluegl/bluegl-gen.py @@ -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)