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 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How can one record component be local and another not? Date: Tue, 5 May 2020 17:45:45 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 5 May 2020 15:45:45 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="0dc4d14fad182f39d9330304b164bd83"; logging-data="987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4C8DVRD+ZYeKjpMhuLl82EdtLDfa8tjo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cancel-Lock: sha1:ula46UMMsXyu63Vv0cGyqV3HjMA= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58592 Date: 2020-05-05T17:45:45+02:00 List-Id: On 5/5/20 1:04 PM, hreba wrote: > > (The reason for the above construction is the need to pass a pointer to a C > library function.) Most likely you do not need to pass a pointer to your C function. For example, given the C function void f (int* i); You can do procedure F (I : in out Interfaces.C.int) with Import, Convention => C, ...; and the compiler will call the C function correctly. -- Jeff Carter "[T]he Musgroves had had the ill fortune of a very troublesome, hopeless son, and the good fortune to lose him before he reached his twentieth year ..." Persuasion 154