[cfe-commits] PATCH: Update the python bindings with MACRO_EXPANSION "enum"
Chandler Carruth
chandlerc at google.com
Thu Jul 14 23:58:03 PDT 2011
On Thu, Jul 14, 2011 at 11:55 PM, Tobias Grosser <tobias at grosser.es> wrote:
> On 07/15/2011 08:47 AM, Chandler Carruth wrote:
>
>> It helps to attach the patch....
>>
>> On Thu, Jul 14, 2011 at 10:52 PM, Chandler Carruth <chandlerc at google.com
>> <mailto:chandlerc at google.com>> wrote:
>>
>> I know next to nothing about the python bindings or how to test
>> them, but I think this is the right patch. If someone who
>> understands how this works can confirm, I'll commit...
>>
>>
>>
>> python-cindex-expansion.patch
>>
>>
>> diff --git a/bindings/python/clang/**cindex.py b/bindings/python/clang/**
>> cindex.py
>> index 8cadcaa..a8d6ec6 100644
>> --- a/bindings/python/clang/**cindex.py
>> +++ b/bindings/python/clang/**cindex.py
>> @@ -558,6 +558,7 @@ CursorKind.IB_OUTLET_**COLLECTION_ATTR =
>> CursorKind(403)
>> # Preprocessing
>> CursorKind.PREPROCESSING_**DIRECTIVE = CursorKind(500)
>> CursorKind.MACRO_DEFINITION = CursorKind(501)
>> +CursorKind.MACRO_EXPANSION = CursorKind(502)
>> CursorKind.MACRO_INSTANTIATION = CursorKind(502)
>>
>
> This does not seem correct to me. MACRO_EXPENSION and MACRO_INSTANTIATION
> have both the number 502.
>
That's correct. INSTANTIATION is becoming EXPANSION. See my patch to
libclang. There, we retain the old enum name (MACRO_INSTANTIATION) with the
same value as a compatibility alias. That way existing code won't break.
If that approach isn't appropriate for the Python bindings, I'll just nuke
the old name... wasn't sure what the best approach was here.
>
> Cheers
> Tobi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110714/5a1fd094/attachment.html>
More information about the cfe-commits
mailing list