mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
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:
parent
d23c821b20
commit
a175b21e4b
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user