std::vector<xmethod_worker_up> *dm_vec)
{
struct objfile *objfile;
- PyObject *py_progspace;
gdb_assert (obj_type != NULL && method_name != NULL);
list individually, but there's no data yet to show it's needed. */
ALL_OBJFILES (objfile)
{
- PyObject *py_objfile = objfile_to_objfile_object (objfile);
+ gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile);
if (py_objfile == NULL)
{
return EXT_LANG_RC_ERROR;
}
- gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile, NULL));
+ gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile.get (),
+ NULL));
gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
objfile_matchers.get ()));
if (temp == NULL)
/* Gather debug methods matchers registered with the current program
space. */
- py_progspace = pspace_to_pspace_object (current_program_space);
+ gdbpy_ref<> py_progspace = pspace_to_pspace_object (current_program_space);
if (py_progspace != NULL)
{
- gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace, NULL));
+ gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace.get (),
+ NULL));
gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
pspace_matchers.get ()));