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!feeder.eternal-september.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Coding access to a C's pointer - pointer Date: Sat, 6 Jun 2020 19:59:08 +0300 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net PDNVXX4PAaUSaIvDUoxXiABDSBTViiX0rSNjCmYlN4cR1dFAU9 Cancel-Lock: sha1:B8+5A7/oZpbApNkQzF26WjZexqA= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58985 Date: 2020-06-06T19:59:08+03:00 List-Id: On 2020-06-06 19:23, Bob Goddard wrote: > I'm trying to shoehorn net-snmp into an Ada conversion and I've hit a roadblock. > > snmp_synch_response requires a pointer to a pointer: > snmp_synch_response(netsnmp_session *, netsnmp_pdu *, netsnmp_pdu **) > > Just how the heck do you code that? You can't just declare a System.Address. Declare the parameter type as "access netsnmp_pdu" and its mode as "access" or "in out" or "out", depending on what snmp_synch_response actually does with the parameter. The mode gets you one C '*' and the access type gets you the second '*'. See RM B.3(68). -- Niklas Holsti niklas holsti tidorum fi . @ .