comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <martin@krischik.com>
Subject: Re: String Pointer Bug
Date: Tue, 09 Nov 2004 20:35:00 +0100
Date: 2004-11-09T20:35:00+01:00	[thread overview]
Message-ID: <7563511.QXIkeEXOyb@linux1.krischik.com> (raw)
In-Reply-To: 35f054ea.0411090847.668b8d4e@posting.google.com

skidmarks wrote:

> "Christoph Karl Walter Grein" <AdaMagica@web.de> wrote in message
> news:<mailman.83.1099920902.10401.comp.lang.ada@ada-france.org>...
>> A long time ago, I made an exegesis of this problem. You may find it
>> below (sorry if the indentation should be lost, it's my mailer that
>> swallows it, I do not know to avoid this):
> 
> Thank you. This is an excellent description. the only (fault) that I
> can see is that it requires a copy operation (Y: aliased D := X).
> 
> I wonder, do you think that:
> 
>    Y: aliased D; for Y'Address use X'Address;
> 
> is a viable alternative (please note, I did not say GOOD alternative).

for Y'Address use X'Address; is an form of Unchecked_Unchecked_Conversion or
on C++ talk a reinterpret_cast - the kind of convertion where no,
absolutely no, check is done. Is is a solution where either performace is
on the essence or nothing else goes.

But yes it is a solution. Viable? Well, your decision. 

With Regards

Martin

PS: I did use Y'Address use X'Address; once for converting C <-> Ada strings
where I wanted better performace then Interfaces.C.

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com



  reply	other threads:[~2004-11-09 19:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 13:34 String Pointer Bug Christoph Karl Walter Grein
2004-11-09 16:47 ` skidmarks
2004-11-09 19:35   ` Martin Krischik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-02 19:32 skidmarks
2004-11-04  6:18 ` Per Sandberg
replies disabled

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