comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Questions: interfacing to C
Date: Tue, 02 Jan 2001 04:32:31 GMT
Date: 2001-01-02T04:32:31+00:00	[thread overview]
Message-ID: <zRc46.72037$A06.2409970@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 978406443.13177.0.nnrp-09.9e98cc46@news.demon.co.uk

>Or will it not convert the access type - and i'd have to use
>System.Address?
>...
>or is it returning a System.Address?

There is a standard package System.Address_To_Access_Conversions.  There
would be no need of such a package if System.Address and Access types
were the same thing, so they must not be the same thing.

Interfaces.C.char_array is defined with "aliased" char.  "Aliased" has
nothing to do with System.Address, and everything to do with Access types.

LRM B.3(68) says
"An Ada 'access' T parameter ... is passed as a t* argument to a C
function, where t is the C type corresponding to the Ada type T."

Conclusion: The interface to C uses Access types, not System.Address.



      parent reply	other threads:[~2001-01-02  4:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-02  3:34 Questions: interfacing to C Julian Morrison
2001-01-02  4:19 ` James Rogers
2001-01-02  4:54   ` Robert Dewar
2001-01-02  5:15     ` Julian Morrison
2001-01-02  4:56   ` Julian Morrison
2001-01-02  4:32 ` tmoran [this message]
replies disabled

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