bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros


From: Ludovic Courtès
Subject: Re: [PATCH hurd 2/2] libshouldbeinlibc: add safe port handling macros
Date: Mon, 06 Jun 2016 15:09:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Thomas Schwinge <thomas@codesourcery.com> skribis:

> The next thought then occurred to me: why not use a programming language
> that allows for defining additional types, powerful enough to model the
> desired semantics?  For example, if we'd compile the Hurd with a C++
> compiler (which, hopefully, will just work -- mostly), could we then
> create a mach_port_ta C++ class, wrapping the "primitive" Mach data type,
> and teach that one the Mach API semantics?

Indeed, for automatic variables, C++ destructors are the same thing as
the ‘cleanup’ attribute, so that would work too.

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]