On Jul 14, 2011, at 11:58 PM, Chandler Carruth wrote:

> On Thu, Jul 14, 2011 at 11:55 PM, Tobias Grosser <[email protected]> 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 <[email protected]
> <mailto:[email protected]>> 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.

It's fine just to nuke the old name in the Python bindings. Nobody depends on 
them, as far as I know.

Patch looks good, thanks for being thorough!

        - Doug

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to