comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Can someone who doesn't know C ever hope to write thick bindings for a C library to Ada?
Date: Sun, 29 Sep 2013 17:36:39 -0700 (PDT)
Date: 2013-09-29T17:36:39-07:00	[thread overview]
Message-ID: <f4f86c7b-b02a-43fd-93be-3d33b3dc40ef@googlegroups.com> (raw)
In-Reply-To: <de31da18-aa6a-4784-903c-c4d25ae11505@googlegroups.com>

On Sunday, September 29, 2013 2:28:45 PM UTC-6, Kevin Keith wrote:
> Okay, so I *sort of* know C, but I'm by no means an expert or proficient in it. I sort of know it in that I can kinda sort follow well commented C code. Earlier I posted about thick SDL bindings, and another person asked if it were possible to utilize C2Ada without knowing C, my question is sort of in between. Is it possible to write thick bindings from auto-generated C bindings (using GNAT) without really knowing C very well?

Yes. I'm certainly no C expert and I'm doing it.
See https://github.com/OneWingedShark/TAO-GL

Several things to watch out for:
1) Using pointers/addresses for arrays, get those to proper Ada arrays ASAP.
2) Keep an eye out for subtyping possibilities. [esp null exclusion or non-numeric exclusions for IEEE754 floats.]
3) It can get kind of tedious, if you don't autogenerate stuff and/or have a clear idea in mind for the interface.


  reply	other threads:[~2013-09-30  0:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 20:28 Can someone who doesn't know C ever hope to write thick bindings for a C library to Ada? Kevin Keith
2013-09-30  0:36 ` Shark8 [this message]
2013-09-30 14:01 ` Marius Amado-Alves
replies disabled

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