On 19 June 2012 01:51, Matt Rice <ratmice(a)gmail.com> wrote:
On Mon, Jun 18, 2012 at 4:49 PM, Philip Herron
<redbrain(a)gcc.gnu.org> wrote:
> Hey
>
> I am working on my gsoc on pxd generation and i was wondering in places like:
>
> PyObject * gcc_Function_repr(struct PyGccFunction * self)
>
> You get the identifiers for things using IDENTIFIER_POINTER and then
> format things into
>
> result = gcc_python_string_from_format("gcc.Function('%s')",
> name);
>
> In my code i have to write code to get the identifier out of this
> format which to me seems a little awkward if we were to make available
> the identifiers non-formatted would be quite nice. Even just a
> supporting python code parsing them out for you would this kind of
> code be useful to the plugin or leaving things as is the preferred
> method.
I think you can use str(foo.name) rather than attempting to parse the repr?
_______________________________________________
gcc-python-plugin mailing list
gcc-python-plugin(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/gcc-python-plugin
Thanks yeah i started using that just seems strange.
--Phil