diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-17 21:23:25 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-17 21:23:25 +0000 |
commit | d59b6f6c38a3e9c229dae40bd6c668be47fe8e48 (patch) | |
tree | d3e248c0abb4d8baf265767d9542537bd1b0d373 /gdb/python/py-type.c | |
parent | 102040f0d08b06980adf402c17b2f039fee7d23c (diff) | |
download | gdb-d59b6f6c38a3e9c229dae40bd6c668be47fe8e48.zip gdb-d59b6f6c38a3e9c229dae40bd6c668be47fe8e48.tar.gz gdb-d59b6f6c38a3e9c229dae40bd6c668be47fe8e48.tar.bz2 |
2010-05-17 Michael Snyder <msnyder@vmware.com>
* 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.
Diffstat (limited to 'gdb/python/py-type.c')
-rw-r--r-- | gdb/python/py-type.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |