* Interfacing C unions in Ada
@ 2014-07-25 13:52 Victor Porton
2014-07-25 14:20 ` Victor Porton
0 siblings, 1 reply; 3+ messages in thread
From: Victor Porton @ 2014-07-25 13:52 UTC (permalink / raw)
Please explain how to interface with C unions.
Discriminants are present in Ada but a missing in C. How to map these things
to each other (a C record without a discriminant and an Ada record)?
Please explain. (I am writing an open source Ada library and helping me you
help the community.)
Ada2012.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Interfacing C unions in Ada
2014-07-25 13:52 Interfacing C unions in Ada Victor Porton
@ 2014-07-25 14:20 ` Victor Porton
2014-07-26 3:55 ` Shark8
0 siblings, 1 reply; 3+ messages in thread
From: Victor Porton @ 2014-07-25 14:20 UTC (permalink / raw)
Victor Porton wrote:
> Please explain how to interface with C unions.
>
> Discriminants are present in Ada but a missing in C. How to map these
> things to each other (a C record without a discriminant and an Ada
> record)?
>
> Please explain. (I am writing an open source Ada library and helping me
> you help the community.)
>
> Ada2012.
Oh, I've found:
pragma Unchecked_Union
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Interfacing C unions in Ada
2014-07-25 14:20 ` Victor Porton
@ 2014-07-26 3:55 ` Shark8
0 siblings, 0 replies; 3+ messages in thread
From: Shark8 @ 2014-07-26 3:55 UTC (permalink / raw)
On 25-Jul-14 08:20, Victor Porton wrote:
> pragma Unchecked_Union
Yep; that's the one you want.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-26 3:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 13:52 Interfacing C unions in Ada Victor Porton
2014-07-25 14:20 ` Victor Porton
2014-07-26 3:55 ` Shark8
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox