comp.lang.ada
 help / color / mirror / Atom feed
From: "Chris Warwick" <chris.warwick@cdcgy.com>
Subject: Re: How do I get this to work??
Date: 1999/01/06
Date: 1999-01-06T00:00:00+00:00	[thread overview]
Message-ID: <770ifd$qui$1@goblin.uunet.ca> (raw)
In-Reply-To: uiuelbj6r.fsf@gsfc.nasa.gov


Stephen Leake wrote in message ...

>Why does Close_Port need a pointer to a Session? If you are passing
>Session to C code, you should probably use 'Address rather than
>'access. Or, define Close_Port to take an access parameter:


I am indeed passing this to some C code, and I realize that what I am doing
is cheating, just a little. The reason is I can't seem to get the stuff to
the C function by value, if I pass it by reference its happy, but it barfs
when I try to do it by value.

My old trick of translating pointers into Ada types by creating a function
to return the record by value also doesn't work...

>function Close_Port (Session : access Session_Type);
>
>If you really, really need the interface you've given,
>'unchecked_access will eliminate the error message.


Thanks, it does indeed eliminate the error, but it leaves me with a bad
taste. Somewhat like resorting to an unchecked_conversion.

Is there a "proper" way to do this, or am I stuck with the unchecked
solution?






  parent reply	other threads:[~1999-01-06  0:00 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-04  0:00 How do I get this to work?? Chris Warwick
1999-01-05  0:00 ` Chris Warwick
1999-01-05  0:00   ` Stephen Leake
1999-01-05  0:00     ` Tom Moran
1999-01-06  0:00       ` robert_dewar
1999-01-06  0:00         ` Larry Kilgallen
1999-01-06  0:00           ` Tom Moran
1999-01-06  0:00         ` Tom Moran
1999-01-07  0:00           ` robert_dewar
1999-01-07  0:00             ` Tom Moran
1999-01-10  0:00               ` robert_dewar
1999-01-10  0:00                 ` Tom Moran
1999-01-10  0:00                   ` robert_dewar
1999-01-10  0:00                     ` Tom Moran
1999-01-10  0:00                     ` Pat Rogers
1999-01-10  0:00                   ` robert_dewar
1999-01-06  0:00         ` Tom Moran
1999-01-07  0:00           ` robert_dewar
1999-01-07  0:00             ` Tom Moran
1999-01-10  0:00               ` robert_dewar
1999-01-06  0:00     ` robert_dewar
1999-01-06  0:00     ` Chris Warwick [this message]
1999-01-06  0:00       ` Tom Moran
1999-01-07  0:00       ` robert_dewar
1999-01-09  0:00         ` Chris Warwick
1999-01-09  0:00           ` Brian Rogoff
1999-01-10  0:00             ` Matthew Heaney
1999-01-09  0:00           ` Simon Wright
1999-01-10  0:00             ` robert_dewar
1999-01-11  0:00               ` Simon Wright
1999-01-16  0:00               ` Chris Warwick
1999-01-16  0:00                 ` robert_dewar
1999-01-18  0:00                   ` Chris Warwick
1999-01-18  0:00                     ` Matthew Heaney
1999-01-16  0:00                 ` Simon Wright
1999-01-16  0:00                 ` Matthew Heaney
1999-01-16  0:00                   ` robert_dewar
1999-01-18  0:00                   ` Chris Warwick
1999-01-18  0:00                     ` Matthew Heaney
1999-01-18  0:00                     ` dennison
1999-01-18  0:00                     ` robert_dewar
1999-01-18  0:00                       ` Tucker Taft
1999-01-19  0:00                         ` Chris Warwick
1999-01-19  0:00                           ` Stephen Leake
1999-01-19  0:00                           ` robert_dewar
1999-01-20  0:00                             ` Jeff Carter
1999-01-20  0:00                               ` robert_dewar
1999-01-21  0:00                                 ` Chris Warwick
1999-01-19  0:00                           ` Tom Moran
1999-01-18  0:00                       ` dennison
1999-01-07  0:00       ` Stephen Leake
1999-01-08  0:00         ` Simon Wright
1999-01-06  0:00   ` Simon Wright
1999-01-22  0:00   ` Nick Roberts
1999-01-05  0:00 ` Tom Moran
replies disabled

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