[cfe-dev] extending clang C-API (CIndex)
Stefan Seefeld
seefeld at sympatico.ca
Fri Jun 11 13:14:15 PDT 2010
On 06/11/2010 03:24 PM, Sebastien Binet wrote:
> hi there,
>
> I am about to work on extending the C-API provided by CIndex and friends
> so I can introspect the AST and (especially) all the xyzDecl (from
> python-ctypes.)
>
>
>
> so the convention would be:
>
> clang_[C++class-name]_[method-name]( cursor )
>
>
> what do you think ?
>
What is the point of such a mapping ? Why not use the C++ API itself ?
The warning I received on this list about using the C++ API directly was
that the (existing) C API was much more stable than the C++ API.
I don't think this stability is related to the language (C vs. C++), but
is caused by the the C++ API being much richer (and thus, no-one is
willing to commit to any form of backward compatibility just yet).
If you propose such a one-to-one mapping, it seems your proposed C API
will be no more stable than the C++ API. Why would anyone use that ?
(Note that I'm looking into mapping the existing AST (C++) API to my
Synopsis ASG (Python) API (http://synopsis.fresco.org), using the
current 2.7 release. I'm aware of this changing, but would hope that
until the next major release it may be useful nonetheless.)
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the cfe-dev
mailing list