This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/5] Make Python inferior-related internal functions return inferior_object*
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Tue, 24 Jan 2017 00:03:12 +0000
- Subject: Re: [PATCH 3/5] Make Python inferior-related internal functions return inferior_object*
- Authentication-results: sourceware.org; auth=none
- References: <20170123224004.8893-1-simon.marchi@ericsson.com> <20170123224004.8893-4-simon.marchi@ericsson.com>
A quick comment, haven't read the whole series yet:
On 01/23/2017 10:40 PM, Simon Marchi wrote:
> -typedef struct
> +struct inferior_object
> {
> PyObject_HEAD
How about switching to:
struct inferior_object : PyObject
{
This then avoids the need for casts to PyObject *.
Googling around for "public PyObject", I find several projects
doing that.
Thanks,
Pedro Alves