]> granicus.if.org Git - clang/commit
Support for Python 3 in libclang python bindings
authorJonathan Coe <jbcoe@me.com>
Thu, 3 Nov 2016 13:55:34 +0000 (13:55 +0000)
committerJonathan Coe <jbcoe@me.com>
Thu, 3 Nov 2016 13:55:34 +0000 (13:55 +0000)
commit4464581bb63e9789e9ee231a8c8800be5f614743
treefff63dd456d6080865a14afb72bb918e577cd1f9
parent47592b1815f5423fa708fca47741886043e6bb32
Support for Python 3 in libclang python bindings

Summary:
Python bindings tests now pass in Python 3.

`map` in Python 3 is lazily evaluated so the method by which functions are registered needed updating.

Strings are unicode in Python 3 not UTF-8, I've tried to create an new c_types-like class (c_string_p) to automate the conversion.

String conversions made explicit where required.

Reviewers: eliben, nemanjai, skalinichev, compnerd

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D26082

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285909 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/python/clang/cindex.py
bindings/python/tests/cindex/test_translation_unit.py