[cfe-commits] [PATCH] [cindex.py] Do not fail when registering non-existing functions

Tobias Grosser tobias at grosser.es
Fri Aug 31 01:43:55 PDT 2012


On 08/27/2012 01:07 AM, Tobias Grosser wrote:
> On 08/25/2012 08:45 AM, Gregory Szorc wrote:
>> I agree with the sentiment of wanting increased compatibility, but I'm
>> hesitant that this change is the right answer.
>
> Hi Gregory,
> thanks for the feedback.

[..] (A long reply, discussing clang compatibility strategies)

I updated the patch according to your comments. The patch does now 
provide an informative error message, if a method cannot be found in 
libclang.so:

-----------------------------------------------------------------------
[cindex.py] Add helper to initialize libclang functions

The helper allows us to define how the initialization of functions
should behave. We use this patch to provide an informative error
message, in case a function is not available:

"LibclangError: /home/grosser/Projekte/llvm/install/lib/libclang.so:
undefined symbol: clang_method_added_in_2020. Please ensure that your
python bindings are compatible with your libclang.so version."

This patch also ensures that no spelling mistakes slip into the library
initialization. At the moment, there are a couple of 'argtype' ->
'argtypes' mispellings that have been overlooked.
-----------------------------------------------------------------------

Cheers
Tobi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cindex.py-Add-helper-to-initialize-libclang-function.patch
Type: text/x-patch
Size: 29414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120831/3bcbfa37/attachment.bin>


More information about the cfe-commits mailing list