summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py
index f5df60522a9..208b9dfcd61 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/fix_get_types.py
@@ -1,15 +1,15 @@
+#!/usr/bin/env python3
+
import re
import argparse
-if __name__=='__main__':
- parser = argparse.ArgumentParser()
- parser.add_argument('input')
- parser.add_argument('output')
- args = parser.parse_args()
+parser = argparse.ArgumentParser ()
+parser.add_argument ('input')
+parser.add_argument ('output')
+args = parser.parse_args ()
- with open(args.input, 'r') as inp:
- with open(args.output, 'w') as out:
- for l in inp.readlines():
- l = re.sub('_t_get_type', '_get_type', l)
- l = re.sub('_T \(', ' (', l)
- out.write(l)
+with open (args.input, 'r') as inp, open (args.output, 'w') as out:
+ for l in inp.readlines ():
+ l = re.sub ('_t_get_type', '_get_type', l)
+ l = re.sub ('_T \(', ' (', l)
+ out.write (l)