From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.16.69 with SMTP id o5mr1633889ica.17.1406478861858; Sun, 27 Jul 2014 09:34:21 -0700 (PDT) X-Received: by 10.182.56.228 with SMTP id d4mr197711obq.5.1406478861623; Sun, 27 Jul 2014 09:34:21 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!h18no8768733igc.0!news-out.google.com!eg1ni5igc.0!nntp.google.com!h18no5303651igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 27 Jul 2014 09:34:21 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.57.209.48; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 173.57.209.48 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Binding a C function wit FILE* object From: "Dan'l Miller" Injection-Date: Sun, 27 Jul 2014 16:34:21 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2038 X-Received-Body-CRC: 1214296853 Xref: news.eternal-september.org comp.lang.ada:21291 Date: 2014-07-27T09:34:21-07:00 List-Id: On Sunday, July 27, 2014 10:45:20 AM UTC-5, Victor Porton wrote: > I am writing thick bindings for Raptor C library. No, as multiple people keep implying or keep telling you overtly: you are = writing a thin binding. If you are asking how to represent a pointer to FI= LE almost directly in Ada, then clearly you are writing a thin binding. Pe= rhaps a thin binding is best for what you envision, but be clear in your th= inking what you are and what you are not doing. > What should I do regarding the following function? > int raptor_uri_print (const raptor_uri *uri, FILE *stream); > The trouble is that Ada probably has no interface with FILE* objects. In a thick binding, Ada would have its own first-class-citizen representati= on roughly analogous to FILE (not pointer to FILE), such as a tagged record= for byte-streams in general from which each format of file is derived into= subclasses.