Skip to content

Commit

Permalink
Modernize Python print syntax to appease external codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
prideout committed Feb 19, 2021
1 parent adbd54f commit 7aa6fcc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libs/bluegl/bluegl-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@

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 = []
Expand All @@ -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:
Expand Down Expand Up @@ -277,7 +277,7 @@ def generateProxies(api, functions, output_dir, platforms):

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])
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7aa6fcc

Please sign in to comment.