<div dir="ltr">| We'll happily commit patches to keep the Python bindings working. <div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#FFFFFF">
<div><br></div><div> - Doug</div></div></blockquote><div><br>I'm attaching a patch (diffed against trunk) with some fixes to the Python bindings, making its tests pass again (on Linux and Windows).<br><br>Some details of the patch:<br>
<br>* Implemented a new function in libclang: clang_isAttr - it is similar to existing clang_Is* functions. Also exposed it to the Python bindings as the is_attr method of Cursor<br>* Fixing TranslationUnit.get_includes to only go through the argument buffer when it contains something. This fixed a crash on Windows<br>
* clang_getFileName returns CXString, not char*. Made appropriate fixes in cindex.py - now the relevant tests pass and we can see the full locations correctly again (previously there was garbage in place of the file name)<br>
* Exposed clang_getCursorDisplayName to the python bindings<br><br>P.S. the patch file was created with 'svn diff' in the root of clang, so it should be applied as 'patch -p0' there. I hope this is an accepted way to submit patches - if something different is required, I'll gladly fix.<br>
<br>Eli<br><br></div></div><br></div>