comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Header-only Ada libraries...
Date: Thu, 31 May 2018 15:34:08 +0200
Date: 2018-05-31T15:34:08+02:00	[thread overview]
Message-ID: <peotkh$dkh$1@dont-email.me> (raw)
In-Reply-To: <f4c08671-3bbb-44cc-8ec1-2eb615c6b076@googlegroups.com>

On 05/31/2018 02:18 PM, joakimds@kth.se wrote:
> 
> A trick that is GNAT specific that I use in the Ada binding to Wayland (https://github.com/joakim-strandberg/wayland_ada_binding) on Linux (and which might work on other platforms too when using GNAT) is using the standard String type where the input argument is char*. In the C code the function wl_display_connect has the following signature:

I don't think it's GNAT specific. This is implementation advice in ARM B.3. But 
I would recommend using the types in Interfaces.C whenever possible when 
interfacing with C. In this case, that would be Interfaces.C.char_array.

When there is no suitable type in Interfaces.C, I recommend only using types 
that have been declared with convention C.

-- 
Jeff Carter
"If a sperm is wasted, God gets quite irate."
Monty Python's the Meaning of Life
56

  parent reply	other threads:[~2018-05-31 13:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 11:14 Header-only Ada libraries Alejandro R. Mosteo
2018-05-31 12:18 ` joakimds
2018-05-31 12:38   ` Egil H H
2018-05-31 13:58     ` joakimds
2018-05-31 12:55   ` Luke A. Guest
2018-05-31 13:34   ` Jeffrey R. Carter [this message]
2018-05-31 13:35 ` Jeffrey R. Carter
2018-05-31 21:04   ` Robert A Duff
2018-05-31 22:53     ` Randy Brukardt
2018-06-01  9:15     ` Jeffrey R. Carter
2018-06-01 10:00       ` Dmitry A. Kazakov
2018-06-05 12:31   ` Alejandro R. Mosteo
replies disabled

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