2011-03-02 Michael Snyder <msnyder@vmware.com>
* python/py-inferior.c (build_inferior_list): Error out if PyList_Append fails. (gdbpy_inferiors): Error out if build_inferior_list fails.
This commit is contained in:
parent
8c6a60d1e6
commit
2d5657570d
@ -1,5 +1,9 @@
|
||||
2011-03-02 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* python/py-inferior.c (build_inferior_list): Error out if
|
||||
PyList_Append fails.
|
||||
(gdbpy_inferiors): Error out if build_inferior_list fails.
|
||||
|
||||
* linux-nat.c (linux_nat_xfer_partial): Preserve errno around
|
||||
a function call.
|
||||
|
||||
|
@ -326,7 +326,9 @@ build_inferior_list (struct inferior *inf, void *arg)
|
||||
PyObject *list = arg;
|
||||
PyObject *inferior = inferior_to_inferior_object (inf);
|
||||
|
||||
PyList_Append (list, inferior);
|
||||
if (PyList_Append (list, inferior))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -343,7 +345,11 @@ gdbpy_inferiors (PyObject *unused, PyObject *unused2)
|
||||
if (!list)
|
||||
return NULL;
|
||||
|
||||
iterate_over_inferiors (build_inferior_list, list);
|
||||
if (iterate_over_inferiors (build_inferior_list, list))
|
||||
{
|
||||
Py_DECREF (list);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return PyList_AsTuple (list);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user