This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/8] Make inferior a class with cdtors, and use new/delete


Pedro Alves <palves@redhat.com> writes:

> gdb/ChangeLog:
> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
>
> 	* inferior.c (free_inferior): Convert to ...
> 	(inferior::~inferior): ... this dtor.
> 	(inferior::inferior): New ctor, factored out from ...
> 	(add_inferior_silent): ... here.  Allocate the inferior with a new
> 	expression.
> 	(delete_inferior): Call delete instead of free_inferior.
> 	* inferior.h (gdb_environ, continuation): Forward declare.
> 	(inferior): Now a class.  Add in-class initialization to all
> 	members.  Make boolean fields bool, except 'detaching'.
> 	(inferior::inferior): New explicit ctor.
> 	(inferior::~inferior): New.

LGTM.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]