This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 01/28] introduce CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF and use it
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 21 May 2013 01:20:38 +0100
- Subject: Re: [PATCH 01/28] introduce CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF and use it
- References: <87ehe638ww dot fsf at fleche dot redhat dot com> <87zjwu1tpa dot fsf at fleche dot redhat dot com> <5193B075 dot 4050508 at redhat dot com> <8761ydmn2y dot fsf at fleche dot redhat dot com>
On 05/20/2013 09:08 PM, Tom Tromey wrote:
>>>>>> >>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>>> >> +#ifdef WITH_CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF_ATTRIBUTE
>>> >> +#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG) \
>>> >> + __attribute__ ((cpychecker_type_object_for_typedef (ARG)))
> Pedro> Could we have a comment here with a short hint at what this is
> Pedro> all about? I assume from the patch that
> Pedro> WITH_CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF_ATTRIBUTE is defined
> Pedro> by cpychecker itself (not autoconf/config.h), but I can see
> Pedro> future readers getting confused.
>
> Sure thing.
> Here is the patch I am checking in.
...
> --- a/gdb/python/python-internal.h
> +++ b/gdb/python/python-internal.h
> @@ -20,6 +20,19 @@
> #ifndef GDB_PYTHON_INTERNAL_H
> #define GDB_PYTHON_INTERNAL_H
>
> +/* These WITH_* macros are defined by the CPython API checker that
> + comes with the Python plugin for GCC. See:
> + https://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html
> + The checker defines a WITH_ macro for each attribute it
> + exposes. */
> +
> +#ifdef WITH_CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF_ATTRIBUTE
> +#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG) \
> + __attribute__ ((cpychecker_type_object_for_typedef (ARG)))
> +#else
> +#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
> +#endif
> +
That's perfect. Thanks!
--
--
Pedro Alves