comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: C bindings, Interfaces.C.Pointers etc.
Date: Tue, 11 May 2004 18:17:39 GMT
Date: 2004-05-11T18:17:39+00:00	[thread overview]
Message-ID: <7N8oc.26984$z06.4466479@attbi_s01> (raw)
In-Reply-To: pan.2004.05.11.13.14.28.345191@linuxchip.demon.co.uk.uk.uk

>4)  Is there some convenient shortcut to avoid using I.C.P?
>    perhaps by declaring an Ada constrained array much larger than
>    intended, and using a subset.
  That's what I'd do.  You clearly can't expect Ada to bounds check an
array that has no bounds, ie, a C array.  If C is doing all the allocating
there's no memory penalty.  If Ada is doing the allocating, you might want
to tell Ada you have a (fixed size) one dimensional array of pointers to
elements, rather than to arrays, and let C assume a pointer to a first
element is a pointer to an array.



  reply	other threads:[~2004-05-11 18:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 13:14 C bindings, Interfaces.C.Pointers etc Dr. Adrian Wrigley
2004-05-11 18:17 ` tmoran [this message]
2004-05-11 18:48 ` Jeffrey Carter
2004-05-12  4:50   ` Simon Wright
2004-05-13 15:26   ` Dr. Adrian Wrigley
2004-05-12  6:30 ` Martin Krischik
2004-05-13 15:56   ` Dr. Adrian Wrigley
2004-05-13 17:37     ` Martin Krischik
2004-05-13 22:42     ` 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