comp.lang.ada
 help / color / mirror / Atom feed
From: Tom Moran <tmoran@bix.com>
Subject: Re: Adjust bug? re-post
Date: 1997/07/19
Date: 1997-07-19T00:00:00+00:00	[thread overview]
Message-ID: <33D1A827.61A7@bix.com> (raw)
In-Reply-To: dewar.869356121@merv


Robert Dewar said:
> This seems obviously legal, and I don't see why you consider it unfortunate.
type Things is new Ada.Finalization.Controlled with private;
procedure Initialize(x:in out Things);
procedure Adjust(x:in out Things);
procedure Finalize(x:in out Things);
type self_access is access all Things;
private
type Things is new Ada.Finalization.Controlled with record
  Myself : self_access;
end record;
...
If both Initialize and Adjust do
  x.myself := x'unchecked_access;
then, since Finalize can never assume that Initialize or Adjust has ever
been performed on the object,  Finalize can not assume that
  x.myself = x'unchecked_access
This certainly makes it harder to include Things in linked data
structures, and I consider that unfortunate.




  reply	other threads:[~1997-07-19  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-19  0:00 Adjust bug? re-post Tom Moran
1997-07-19  0:00 ` Robert Dewar
1997-07-19  0:00   ` Tom Moran [this message]
1997-07-20  0:00   ` Tom Moran
1997-07-21  0:00     ` Tucker Taft
1997-07-20  0:00 ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox