From: Julian Day <julianday.spam@trap.geocities.com>
Subject: Re: Nontrivial examples of C interface with Ada
Date: 2000/05/26
Date: 2000-05-26T00:00:00+00:00 [thread overview]
Message-ID: <392E6C58.3926413F@trap.geocities.com> (raw)
In-Reply-To: 392E67F4.15275C1A@trap.geocities.com
Julian Day wrote:
> I hit on a similar issue a couple of years ago and 'dreamed' up what I
> thought was quite a cute situation at the time.
Oops, that should be solution, not situation...
>
>
> pacakge Ada.Text_IO.C_Interface is
> type File_Descriptor_Type is new Interfaces.C.Int; -- or similar
> function Associate (FD : File_Descriptor_Type) return
> Ada.Text_IO.File_Type;
> end Ada.Text_IO.C_Interface;
>
> Since this is a child of Ada.Text_IO, it can fill out an appropriate
> File_Type, and 'regular' Text_IO will then just work!
>
(Before I get torn apart)
I think there were two fundemental problems as I remember.
1. On the compiler I was using, the implementation of File_Type had been
hidden in Text_IO using
private
type XXX; -- I can't remember the name.
type File_Type is access XXX;
2. I did not have the body of Ada.Text_IO, to have a look at the
implementation of XXX on the compiler I was using.
Julian
next prev parent reply other threads:[~2000-05-26 0:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-23 0:00 Nontrivial examples of C interface with Ada gressett
2000-05-24 0:00 ` David Emery
2000-05-24 0:00 ` Ted Dennison
2000-05-24 0:00 ` Marin D. Condic
2000-05-25 0:00 ` tmoran
2000-05-25 0:00 ` Ted Dennison
2000-05-25 0:00 ` tmoran
2000-05-25 0:00 ` Ted Dennison
2000-05-25 0:00 ` tmoran
2000-05-26 0:00 ` Julian Day
2000-05-26 0:00 ` Julian Day [this message]
2000-05-25 0:00 ` Geoff Bull
2000-05-25 0:00 ` tmoran
2000-05-26 0:00 ` Marin D. Condic
2000-05-27 0:00 ` tmoran
2000-05-27 0:00 ` Marin D. Condic
2000-05-28 0:00 ` tmoran
2000-05-28 0:00 ` Robert Dewar
2000-05-28 0:00 ` Marin D. Condic
2000-05-28 0:00 ` tmoran
2000-05-25 0:00 ` Ted Dennison
2000-05-25 0:00 ` tmoran
2000-05-29 0:00 ` Geoff Bull
2000-05-24 0:00 ` Terry Westley
2000-05-24 0:00 ` tmoran
2000-05-24 0:00 ` Marin D. Condic
2000-05-24 0:00 ` Scott Ingram
2000-05-24 0:00 ` Marin D. Condic
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox