gdb/python: Use copy-initialization more when possible

gdb/ChangeLog:
2018-08-24  Pedro Alves  <palves@redhat.com>

	* python/py-bpevent.c (create_breakpoint_event_object): Use
	copy-initialization.
	* python/py-continueevent.c (emit_continue_event): Use
	copy-initialization.
	* python/py-exitedevent.c (create_exited_event_object): Return a
	gdbpy_ref<>.
	(emit_exited_event): Use copy-initialization.
	* python/py-inferior.c (python_new_inferior)
	(python_inferior_deleted, add_thread_object): Use
	copy-initialization.
	* python/py-infevents.c (create_inferior_call_event_object)
	(create_register_changed_event_object)
	(create_memory_changed_event_object): Return a gdbpy_ref<>.
	(emit_inferior_call_event, emit_memory_changed_event)
	(emit_register_changed_event): Use copy-initialization.
	* python/py-newobjfileevent.c (create_new_objfile_event_object):
	Return a gdbpy_ref<>.
	(emit_new_objfile_event): Use copy-initialization.
	(create_clear_objfiles_event_object): Return a gdbpy_ref<>.
	(emit_clear_objfiles_event): Use copy-initialization.
	* python/py-signalevent.c (create_signal_event_object): Use
	copy-initialization.
	* python/py-threadevent.c (create_thread_event_object): Use
	copy-initialization.
This commit is contained in:
Pedro Alves
2018-08-24 20:09:19 +01:00
parent da3c873831
commit d98fc15be2
9 changed files with 61 additions and 39 deletions

View File

@ -28,7 +28,7 @@ gdbpy_ref<>
create_breakpoint_event_object (PyObject *breakpoint_list, PyObject *first_bp)
{
gdbpy_ref<> breakpoint_event_obj
(create_stop_event_object (&breakpoint_event_object_type));
= create_stop_event_object (&breakpoint_event_object_type);
if (breakpoint_event_obj == NULL)
return NULL;