From d59b6f6c38a3e9c229dae40bd6c668be47fe8e48 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 17 May 2010 21:23:25 +0000 Subject: 2010-05-17 Michael Snyder * python/py-auto-load.c: White space. * python/py-block.c: White space. * python/py-breakpoint.c: White space. * python/py-cmd.c: White space. * python/py-function.c: White space. * python/py-lazy-string.c: White space. * python/py-objfile.c: White space. * python/py-param.c: White space. * python/py-prettyprint.c: White space. * python/py-progspace.c: White space. * python/py-symtab.c: White space. * python/python.c: White space. * python/py-type.c: White space. * python/py-utils.c: White space. * python/py-value.c: White space. --- gdb/python/py-type.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/python/py-type.c') diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index ef658df..b901255 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -101,6 +101,7 @@ static void field_dealloc (PyObject *obj) { field_object *f = (field_object *) obj; + Py_XDECREF (f->dict); f->ob_type->tp_free (obj); } @@ -109,6 +110,7 @@ static PyObject * field_new (void) { field_object *result = PyObject_New (field_object, &field_object_type); + if (result) { result->dict = PyDict_New (); @@ -128,6 +130,7 @@ static PyObject * typy_get_code (PyObject *self, void *closure) { struct type *type = ((type_object *) self)->type; + return PyInt_FromLong (TYPE_CODE (type)); } @@ -222,6 +225,7 @@ typy_fields (PyObject *self, PyObject *args) for (i = 0; i < TYPE_NFIELDS (type); ++i) { PyObject *dict = convert_field (type, i); + if (!dict) { Py_DECREF (result); @@ -243,6 +247,7 @@ static PyObject * typy_get_tag (PyObject *self, void *closure) { struct type *type = ((type_object *) self)->type; + if (!TYPE_TAG_NAME (type)) Py_RETURN_NONE; return PyString_FromString (TYPE_TAG_NAME (type)); @@ -439,6 +444,7 @@ typy_lookup_typename (char *type_name, struct block *block) { struct type *type = NULL; volatile struct gdb_exception except; + TRY_CATCH (except, RETURN_MASK_ALL) { if (!strncmp (type_name, "struct ", 7)) @@ -675,6 +681,7 @@ typy_dealloc (PyObject *obj) { /* Must reset head of list. */ struct objfile *objfile = TYPE_OBJFILE (type->type); + if (objfile) set_objfile_data (objfile, typy_objfile_data_key, type->next); } -- cgit v1.1