comp.lang.ada
 help / color / mirror / Atom feed
From: Ole-Hjalmar Kristensen <ole-hjalmar.kristensen@substitute_employer_here.com>
Subject: Re: Mixed languages and frustration.
Date: 16 Oct 2003 08:40:13 +0200
Date: 2003-10-16T06:40:13+00:00	[thread overview]
Message-ID: <wvbr3cdtu1ma.fsf@sun.com> (raw)
In-Reply-To: un0c21ow8.fsf@nasa.gov

>>>>> "SL" == Stephen Leake <Stephe.Leake@nasa.gov> writes:

    SL> Freejack <user@nospam.net> writes:
    >> Alright, so I'm sitting here trying to juggle between C pointers and Ada
    >> access types/allocators, with moderate success. And I start wondering to
    >> myself "How many people on comp.lang.ada nearly blow a fuse when doing
    >> the same thing?"

    SL> I try to avoid code in C at all costs.

    SL> When I do need to pass pointers to C, I just use 'Address on the Ada
    SL> side. It's not guarantteed portable, but neither is the C code, so
    SL> it's good enough. And it's far easier to get right, and usually more
    SL> efficient, than messing with Interfaces.C pointer stuff.

    SL> -- 
    SL> -- Stephe

Yes. And in the same spirit, to go in the opposite direction, if you
have got a C pointer, just declare an Ada object and use an address
rep clause to put it where the pointer points. Same caveats apply.

-- 
If you are going to shoot, shoot, don't talk.
Il Brutto



      reply	other threads:[~2003-10-16  6:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14 20:24 Mixed languages and frustration Freejack
2003-10-14 20:48 ` Robert I. Eachus
2003-10-14 20:53 ` sk
2003-10-14 21:53 ` Wes Groleau
2003-10-15  0:01   ` Freejack
2003-10-15  2:58   ` Jeffrey Carter
2003-10-15  4:32     ` Wes Groleau
2003-10-15  4:24 ` Steve
2003-10-15 15:50 ` Stephen Leake
2003-10-16  6:40   ` Ole-Hjalmar Kristensen [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