From: Jeffrey Carter <spam@spam.com>
Subject: Re: Returning data from Ada to C
Date: Fri, 06 May 2005 03:36:45 GMT
Date: 2005-05-06T03:36:45+00:00 [thread overview]
Message-ID: <hDBee.6345$GQ5.6288@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <4f1a9$4278d210$cf702d0d$18288@PRIMUS.CA>
Igor Khavkine wrote:
> Ok, that's good to know. Also, will I be able to free Ada allocated
> memory with the standard C library `free()'? For example, what do I do if
> I want to free the storage pointed to by `solvec' below?
No. However, in the example, the memory isn't on the heap and shouldn't
be deallocated.
> Great! Now, what type will `Solvec' have? I presume that GNAT will bark at
> me if I use the wrong type.
In Ada, it's a pointer to Double; to C it should look like a pointer to
double. You probably should declare your array type to be convention C,
just to be on the safe side.
--
Jeff Carter
"From this day on, the official language of San Marcos will be Swedish."
Bananas
28
next prev parent reply other threads:[~2005-05-06 3:36 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 [this message]
2005-05-07 22:12 ` igor.kh
2005-05-08 2:07 ` Jeffrey Carter
2005-05-08 19:58 ` Jeffrey Carter
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