aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-progspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-progspace.c')
-rw-r--r--gdb/python/py-progspace.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index baab3be5ee6..5a23c4c7177 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -166,40 +166,40 @@ pspy_dealloc (PyObject *self)
/* Initialize a pspace_object.
The result is a boolean indicating success. */
-static int
-pspy_initialize (pspace_object *self)
+static bool
+pspy_initialize (gdbpy_ref<pspace_object> &self)
{
self->pspace = NULL;
self->dict = PyDict_New ();
if (self->dict == NULL)
- return 0;
+ return false;
self->printers = PyList_New (0);
if (self->printers == NULL)
- return 0;
+ return false;
self->frame_filters = PyDict_New ();
if (self->frame_filters == NULL)
- return 0;
+ return false;
self->frame_unwinders = PyList_New (0);
if (self->frame_unwinders == NULL)
- return 0;
+ return false;
self->type_printers = PyList_New (0);
if (self->type_printers == NULL)
- return 0;
+ return false;
self->xmethods = PyList_New (0);
if (self->xmethods == NULL)
- return 0;
+ return false;
self->missing_file_handlers = PyList_New (0);
if (self->missing_file_handlers == nullptr)
- return 0;
+ return false;
- return 1;
+ return true;
}
PyObject *
@@ -591,7 +591,7 @@ pspace_to_pspace_object (struct program_space *pspace)
((pspace_object *) PyObject_New (pspace_object, &pspace_object_type));
if (object == NULL)
return NULL;
- if (!pspy_initialize (object.get ()))
+ if (!pspy_initialize (object))
return NULL;
object->pspace = pspace;