* python/py-prettyprint.c (search_pp_list): Fix error checking.
This commit is contained in:
parent
0526b37ab5
commit
1bdb0c5472
2 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2010-10-12 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/py-prettyprint.c (search_pp_list): Fix error checking.
|
||||||
|
|
||||||
2010-10-12 Sami Wagiaalla <swagiaal@redhat.com>
|
2010-10-12 Sami Wagiaalla <swagiaal@redhat.com>
|
||||||
|
|
||||||
* gdbtypes.c (do_is_ancestor): New function.
|
* gdbtypes.c (do_is_ancestor): New function.
|
||||||
|
|
|
@ -49,9 +49,20 @@ search_pp_list (PyObject *list, PyObject *value)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Skip if disabled. */
|
/* Skip if disabled. */
|
||||||
if (PyObject_HasAttr (function, gdbpy_enabled_cst)
|
if (PyObject_HasAttr (function, gdbpy_enabled_cst))
|
||||||
&& ! PyObject_IsTrue (PyObject_GetAttr (function, gdbpy_enabled_cst)))
|
{
|
||||||
continue;
|
PyObject *attr = PyObject_GetAttr (function, gdbpy_enabled_cst);
|
||||||
|
int cmp;
|
||||||
|
|
||||||
|
if (!attr)
|
||||||
|
return NULL;
|
||||||
|
cmp = PyObject_IsTrue (attr);
|
||||||
|
if (cmp == -1)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!cmp)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
printer = PyObject_CallFunctionObjArgs (function, value, NULL);
|
printer = PyObject_CallFunctionObjArgs (function, value, NULL);
|
||||||
if (! printer)
|
if (! printer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue