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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5afd69f1373c41cc X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!l31g2000yqb.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Interfacing with C ; an ununsed fields dilemma Date: Thu, 2 Jul 2009 05:01:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <5a416858-4a52-412d-8051-6dadb5eadb2c@t21g2000yqi.googlegroups.com> NNTP-Posting-Host: 77.198.58.253 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1246536097 11602 127.0.0.1 (2 Jul 2009 12:01:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 2 Jul 2009 12:01:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l31g2000yqb.googlegroups.com; posting-host=77.198.58.253; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6797 Date: 2009-07-02T05:01:18-07:00 List-Id: On 2 juil, 11:45, Maciej Sobczak wrote: > In some cases it is actually the only way to go, because in some C > libraries the data structure layout can change from version to version > and even though the proper layout is always defined in C header files, > they are not *automatically* understood by Ada. You are not going to > update your Ada wrapper every time, really. For this single case, this API will not evolve anymore, as it has been replaced by another, totaly different and incompatible with te two previous versions... but which no body use. The idea of a pre-wrapper before Ada is nice and clean (although at the time, I prefer to not do this way, for some reasons) > It is also the only way to interface with more elaborated C++ > libraries. That's true, for C++, this would be mandatory (hope I will never have to interface C++) Finally, I think I will simply declare these unused fields in the public part, in order to be able to give them an initialization value, but I really do not like it to appears in the public part.