comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: Returning data from Ada to C
Date: Sun, 08 May 2005 19:58:34 GMT
Date: 2005-05-08T19:58:34+00:00	[thread overview]
Message-ID: <Kbufe.10702$HL2.853@newsread3.news.pas.earthlink.net> (raw)
In-Reply-To: <Zvefe.10490$HL2.8738@newsread3.news.pas.earthlink.net>

Jeffrey Carter wrote:
> igor.kh@gmail.com wrote:
> 
>>     a_ptr := a'Unchecked_Access;
> 
> This is not a pointer to C_Integer_Array. It's a pointer to the 
> anonymous array type in the declaration of A.

Let me correct this statement:

This is not a pointer to Int, which is how A_Ptr is declared. It's a 
pointer to the anonymous array type in the declaration of A.

Not also that A is local to the Ada procedure, and will go away when the 
procedure returns, making A_Ptr a dangling reference.

-- 
Jeff Carter
"Now go away or I shall taunt you a second time."
Monty Python & the Holy Grail
07



  reply	other threads:[~2005-05-08 19:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-03 23:49 Returning data from Ada to C igor.kh
2005-05-04  4:49 ` Jeffrey Carter
2005-05-04 13:45   ` Igor Khavkine
2005-05-04 13:58     ` Alex R. Mosteo
2005-05-06  3:36     ` Jeffrey Carter
2005-05-07 22:12       ` igor.kh
2005-05-08  2:07         ` Jeffrey Carter
2005-05-08 19:58           ` Jeffrey Carter [this message]
2005-05-08  9:41         ` Martin Dowie
2005-05-08 14:55           ` Ludovic Brenta
2005-05-08 14:58             ` Ludovic Brenta
2005-05-09 22:49               ` igor.kh
2005-05-10 12:48                 ` Ludovic Brenta
2005-05-16  4:35   ` Dave Thompson
2005-05-16  5:03     ` Jeffrey Carter
replies disabled

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