This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix py-xmethods.c when compiled with -Werror against Python 2.4
- From: Pedro Alves <palves at redhat dot com>
- To: Siva Chandra <sivachandra at google dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Cc: Doug Evans <dje at google dot com>, uweigand at de dot ibm dot com
- Date: Wed, 04 Jun 2014 20:56:54 +0100
- Subject: Re: [PATCH] Fix py-xmethods.c when compiled with -Werror against Python 2.4
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gydnP62Od_5iUv1PeCquRSVNNJky31C8ZwTDY3ret8ACQ at mail dot gmail dot com>
On 06/04/2014 07:05 PM, Siva Chandra wrote:
> Does the attached patch fix the issue pointed out by Ulrich Weigand
> here: https://sourceware.org/ml/gdb-patches/2014-06/msg00169.html
>
> ChangeLog
> 2014-06-04 Siva Chandra Reddy <sivachandra@google.com>
>
> * python/py-xmethods.c (invoke_match_method)
> (gdbpy_get_matching_xmethod_workers, gdbpy_get_xmethod_arg_types):
> Cast the second arg to PyObject_GetAttrString and
> PyObject_GetAttrString to char *.
>
How about we handle this in a central place, like Py_DECREF is
handled ? See python-internal.h.
--
Pedro Alves