This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/5] Make Python inferior-related internal functions return inferior_object*


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]