]> Git Repo - binutils.git/blobdiff - gdb/python/py-progspace.c
Remove CPYCHECKER_RETURNS_BORROWED_REF
[binutils.git] / gdb / python / py-progspace.c
index 3c468475b1594788777e58cb9db2007121ac2b9b..1e16b845e0a5f461ffc696e76b8c94daa2c4a113 100644 (file)
@@ -344,9 +344,10 @@ pspy_get_objfiles (PyObject *self_, PyObject *args)
 
       ALL_PSPACE_OBJFILES (self->pspace, objf)
        {
-         PyObject *item = objfile_to_objfile_object (objf);
+         gdbpy_ref<> item = objfile_to_objfile_object (objf);
 
-         if (!item || PyList_Append (list.get (), item) == -1)
+         if (item == nullptr
+             || PyList_Append (list.get (), item.get ()) == -1)
            return NULL;
        }
     }
This page took 0.022031 seconds and 4 git commands to generate.