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 1/4] Change pspace_to_pspace_object to return a new reference


On 2018-09-15 9:19 p.m., Simon Marchi wrote:
> On 2018-09-13 1:30 a.m., Tom Tromey wrote:
>> This changes pspace_to_pspace_object to return a new reference and
>> fixes up all the callers.
> 
> Actually, I think the patch is missing a hunk or something, I get this error:
> 
> /home/simark/src/binutils-gdb/gdb/python/py-inferior.c:474:13: error: no viable conversion from 'gdbpy_ref<>' (aka 'gdb::ref_ptr<_object, gdbpy_ref_policy<_object> >') to 'PyObject *' (aka '_object *')
>   PyObject *py_pspace = pspace_to_pspace_object (pspace);
>             ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.

Ah ok, this is the code I added recently, that's why.  I think changing it to

  return pspace_to_pspace_object (pspace).release ();

should work.

Simon


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