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 00/12] remove some cleanups using a cleanup function


>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> The cleanup_function class can take any number of arguments, and is
Andrew> cancellable if needed, it can also take zero arguments.  In theory
Andrew> this would allow any cleanup that only needs to hold some simple
Andrew> arguments by value and call a static function to be made into a
Andrew> `cleanup_function` specialisation.

It seems reasonable to me.  I think the advantage it has over my
approach is that the resulting classes are more similar to what we would
have written had we implemented a custom class to replace each cleanup.
Also it helps enforce the idea that we don't want cleanup_functions to
be used in an unrestricted way.

Andrew> How do you think this compares to your original patches?  Any interest
Andrew> in this approach?

Yes, let's do this.

Tom


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