Avoid decoding already-decoded strings from cindex.

Recent versions of clang.cindex include [code][1] that converts
the internal byte strings to python str for you.

  [1]: https://github.com/llvm-mirror/clang/blob/master/bindings/python/clang/cindex.py#L72
This commit is contained in:
Dan 2019-05-15 17:58:50 -04:00 committed by Wenzel Jakob
parent d23c821b20
commit a175b21e4b

View File

@ -59,7 +59,7 @@ job_semaphore = Semaphore(job_count)
output = [] output = []
def d(s): def d(s):
return s.decode('utf8') return s if isinstance(s, str) else s.decode('utf8')
def sanitize_name(name): def sanitize_name(name):