[COMMIT] Centralize workaround for Python 2.6's Py_DECREF. (Re: [patch] Compilation regression with python-2.6)

Pedro Alves
2013-05-21T20:55:23Z

On 05/21/2013 05:23 PM, Pedro Alves wrote:
> Subject: Centralize workaround for Python 2.6's Py_DECREF.
>
> Wrap/redefine Py_DECREF ourselves, avoiding the need for uses to care
> about extra braces due to the fact that Python only started wrapping Py_DECREF
> in 'do {} while (0)' after 2.6.
>
> gdb/
> 2013-05-21 Pedro Alves <palves@redhat.com>
>
> * python/py-utils.c (py_decref): Remove extra braces.
> (gdb_pymodule_addobject): Remove extra braces.
> * python-internal.h (gdb_Py_DECREF): New static inline function.
> (Py_DECREF): Redefine as calling gdb_Py_DECREF.

I've applied this one.

--
Pedro Alves