HomePhabricator

Support for Python 3 in libclang python bindings

Description

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

Details

Committed
jbcoeNov 3 2016, 6:55 AM
Differential Revision
D26082: Support for Python 3 in libclang python bindings
Parents
rL285908: [CMake] Make CMAKE_INSTALL_RPATH work again
Branches
Unknown
Tags
Unknown

Event Timeline

omtcyfz added inline comments.
/cfe/trunk/bindings/python/clang/cindex.py
80

FWIW I think the following is more Pythonic

from future.builtins import range