summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/methodcycles.py
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/methodcycles.py')
-rwxr-xr-xcompilerplugins/clang/methodcycles.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/compilerplugins/clang/methodcycles.py b/compilerplugins/clang/methodcycles.py
index 4a153ae1c0e5..5a1b731cc9d5 100755
--- a/compilerplugins/clang/methodcycles.py
+++ b/compilerplugins/clang/methodcycles.py
@@ -1,10 +1,9 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from collections import defaultdict
import io
import re
import subprocess
-import sys
# --------------------------------------------------------------------------------------------
# globals
@@ -33,7 +32,7 @@ def normalizeTypeParams( line ):
# --------------------------------------------------------------------------------------------
cnt = 0
-with io.open("workdir/loplugin.methodcycles.log", "rb", buffering=1024*1024) as txt:
+with io.open("workdir/loplugin.methodcycles.log", "r", buffering=1024*1024) as txt:
for line in txt:
tokens = line.strip().split("\t")
if tokens[0] == "definition:":
@@ -106,7 +105,6 @@ for caller in definitionSet:
or "include/rtl/" in location \
or "include/sal/" in location \
or "include/salhelper/" in location \
- or "include/systools/" in location \
or "include/typelib/" in location \
or "include/uno/" in location \
or "workdir/UnpackedTarball/" in location \
@@ -132,10 +130,10 @@ uno_constructor_entrypoints = set()
git_grep_process = subprocess.Popen("git grep -h 'constructor=' -- *.component", stdout=subprocess.PIPE, shell=True)
with git_grep_process.stdout as txt:
for line in txt:
- idx1 = line.find("\"")
- idx2 = line.find("\"", idx1 + 1)
+ idx1 = line.find(b"\"")
+ idx2 = line.find(b"\"", idx1 + 1)
func = line[idx1+1 : idx2]
- uno_constructor_entrypoints.add(func)
+ uno_constructor_entrypoints.add(func.decode('utf-8'))
for caller in callDict:
if "(com::sun::star::uno::XComponentContext *,const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)" in caller:
for func in uno_constructor_entrypoints:
@@ -264,4 +262,4 @@ def print_partitions():
count = count + 1
if count>1000: break
-print_partitions() \ No newline at end of file
+print_partitions()