On Fri, 2013-02-15 at 15:47 -0500, David Malcolm wrote:
I'm working on adding support for using the plugin with gcc 4.8
prereleases, and so it was time to "bite the bullet" and merge the
"proposed-plugin-api" branch.
This adds a "gcc-c-api" subdirectory: an intermediate C layer that's
intended to shield the plugin from changes to GCC's own API (and
hopefully eventually become an API for all GCC plugins to use). The 4.7
vs 4.8 differences can live there.
I also plan a big symbol renaming: given that all of the gcc-c-api's
symbols begin with gcc_, it's somewhat confusing to have symbols within
the plugin proper that use such naming. So I plan to rename plugin
symbols so that they are prefixed with PyGcc and use
CamelCase_WithOneUnderscore, like Python itself. (this is a slight
violation of PEP 7 in that you're not meant to use "Py" as a prefix, but
I don't see it being an issue).
This should make it easy to distinguish the gcc-c-api layer
(lower_case_with_multiple_underscores) from the python plugin layer
(CamelCase_WithOneUnderscore).
I did the big symbol renaming in
http://git.fedorahosted.org/cgit/gcc-python-plugin.git/commit/?id=ad760a0...
and also in:
http://git.fedorahosted.org/cgit/gcc-python-plugin.git/commit/?id=27db1f4...
where all type objects now have a _TypeObj suffix.
(this greatly helps deal with e.g. the PyTypeObject for the gcc.Type
type, which used to be called gcc_Type_Type, and is now called
PyGccType_TypeObj, which is moderately less confusing :) )
Dave