Re: [PATCH] Python/CIndex include file support (take 2)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Python/CIndex include file support (take 2)

Andrew Sutton

> I was back and forth on that issue.  Also, I'm not fully convinced that the
> returning tuples is the right thing to do. It might be better to create a
> class called "Inclusion" that explicitly names the including file, included
> file, location, depth, etc.

Yeah, I haven't looked closely, but I think it might make sense to have a class.

Let me rewrite that and post a new patch for consideration.

Here's a 2nd take on the file inclusions patch. The includes property is now a get_includes function. I've added a class FileInclusion that provides a) the source (including) file, the target (included) file, location, depth, and a property for determining if the inclusion is the "input file."

I'm not sure about the name of the class or attributes. They make sense to me, but there may be more appropriate names.

Andrew Sutton
[hidden email]

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

py.diff (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Python/CIndex include file support (take 2)

Daniel Dunbar
Hi Andrew,

Looks great to me, applied in r96106 with a tweak in r96107. Thanks
for the example, too! Now we just need a good viz tool for viewing the
hefty .dot files that come out of clang. :)

 - Daniel

On Thu, Feb 4, 2010 at 9:49 AM, Andrew Sutton <[hidden email]> wrote:

>
>>> > I was back and forth on that issue.  Also, I'm not fully convinced that
>>> > the
>>> > returning tuples is the right thing to do. It might be better to create
>>> > a
>>> > class called "Inclusion" that explicitly names the including file,
>>> > included
>>> > file, location, depth, etc.
>>>
>>> Yeah, I haven't looked closely, but I think it might make sense to have a
>>> class.
>>
>> Let me rewrite that and post a new patch for consideration.
>
> Here's a 2nd take on the file inclusions patch. The includes property is now
> a get_includes function. I've added a class FileInclusion that provides a)
> the source (including) file, the target (included) file, location, depth,
> and a property for determining if the inclusion is the "input file."
>
> I'm not sure about the name of the class or attributes. They make sense to
> me, but there may be more appropriate names.
>
> Andrew Sutton
> [hidden email]
>

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