comp.lang.ada
 help / color / mirror / Atom feed
From: awdorrin <awdorrin@gmail.com>
Subject: Re: Interfacing between Ada and C: records and structs
Date: Wed, 1 Aug 2012 05:16:06 -0700 (PDT)
Date: 2012-08-01T05:16:06-07:00	[thread overview]
Message-ID: <d34f0504-0a73-4d34-b5ef-abf14148fdd4@googlegroups.com> (raw)
In-Reply-To: <a7quhbFq2eU1@mid.individual.net>

On Tuesday, July 31, 2012 4:46:34 PM UTC-4, Niklas Holsti wrote:
>
> If the goal is to force passing by reference, another way is to make the
> Mutex type limited:
> 
>    type Mutex is limited record
>       Mutex : aliased POSIX.C.pthread_mutex_t;
>    end record;
> 
> Being "limited" should not increase the size of the record. But it
> forbids some operations on the type, chiefly ":=".

I am a bit hesitant to change the Florist library code in my project. But from looking at the Florist SourceForge website, it doesn't look like this API is actively developed by the open source community any longer.

For now, I think I'll keep padding in my C-code to match up to the memory space generated in Ada. I'm starting to get too 'distracted' from the main goal of running gnatpp on this legacy code. :)

Thanks!



  reply	other threads:[~2012-08-02  7:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 16:38 Interfacing between Ada and C: records and structs awdorrin
2012-07-31 17:16 ` Niklas Holsti
2012-07-31 18:44   ` awdorrin
2012-07-31 19:08     ` awdorrin
2012-07-31 19:27       ` Simon Wright
2012-07-31 19:44         ` awdorrin
2012-07-31 20:46           ` Niklas Holsti
2012-08-01 12:16             ` awdorrin [this message]
2012-07-31 19:23     ` Simon Wright
2012-08-02  4:39     ` Shark8
2012-08-02 12:32       ` awdorrin
     [not found] <7beb59ba-ca6f-476e-8b39-604196b0b79f@googlegroups.com>
2012-08-01  2:51 ` 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