comp.lang.ada
 help / color / mirror / Atom feed
From: Rod Chapman <rod@praxis-cs.co.uk>
Subject: Re: How to pass access parameters to/from C safely/portably?
Date: 1998/06/05
Date: 1998-06-05T00:00:00+00:00	[thread overview]
Message-ID: <3577D39C.3CECE1C0@praxis-cs.co.uk> (raw)
In-Reply-To: 3572CB7D.FD6D8084@praxis-cs.co.uk


Rod Chapman wrote:

> I wonder if anyone out there could advise me on a point of
> portability and style with respect to passing
> access parameters from C to Ada.
>

I can close this thread before anyone has even responded!

The answers are:
1) Read the implementation advice in LRM B.3 carefully, and check that
your compiler follows it.

2) Check that your compiler does or doesn't expect accessibility
information to be passed to formal anonymous access parameters
that appear in subprograms which  have pragma Import or Export.

For example, with ObjectAda, I find that applying pragma Export
forces an anonymous access parameter to not have accessibility
checks applied, and the actual parameter can be a simple C
pointer-to-something - this seems to be the obvious implementation,
but it's worth checking...anyone confirm if GNAT does the same?
 - Rod






  reply	other threads:[~1998-06-05  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-01  0:00 How to pass access parameters to/from C safely/portably? Rod Chapman
1998-06-05  0:00 ` Rod Chapman [this message]
1998-06-06  0:00   ` Robert Dewar
replies disabled

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