From a175b21e4b3b8f0032d30dbf78f33435f1273cd8 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 15 May 2019 17:58:50 -0400 Subject: [PATCH] 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 --- tools/mkdoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkdoc.py b/tools/mkdoc.py index 1fd8cceed..740bc3b32 100644 --- a/tools/mkdoc.py +++ b/tools/mkdoc.py @@ -59,7 +59,7 @@ job_semaphore = Semaphore(job_count) output = [] def d(s): - return s.decode('utf8') + return s if isinstance(s, str) else s.decode('utf8') def sanitize_name(name):