From 9f4ff0c296819bbe3abd4c3717cf8677c5a89310 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 20 May 2013 20:26:39 +0000 Subject: * python/py-event.c (gdbpy_initialize_event_generic): Return early if PyType_Ready fails. --- gdb/ChangeLog | 5 +++++ gdb/python/py-event.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4894c0d..5c4e290 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-05-20 Tom Tromey + * python/py-event.c (gdbpy_initialize_event_generic): Return + early if PyType_Ready fails. + +2013-05-20 Tom Tromey + * python/py-type.c (make_fielditem): Add gdb_assert_not_reached as 'default' in the switch. diff --git a/gdb/python/py-event.c b/gdb/python/py-event.c index afd07fe..72d57cb 100644 --- a/gdb/python/py-event.c +++ b/gdb/python/py-event.c @@ -76,7 +76,7 @@ gdbpy_initialize_event_generic (PyTypeObject *type, char *name) { if (PyType_Ready (type) < 0) - goto fail; + return -1; Py_INCREF (type); if (PyModule_AddObject (gdb_module, name, (PyObject *) type) < 0) -- cgit v1.1