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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:4357:: with SMTP id s84mr2634870jab.16.1551448134473; Fri, 01 Mar 2019 05:48:54 -0800 (PST) X-Received: by 2002:aca:b388:: with SMTP id c130mr3234464oif.117.1551448134187; Fri, 01 Mar 2019 05:48:54 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!y22no85425ita.0!news-out.google.com!d79ni178itc.0!nntp.google.com!y22no85420ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 1 Mar 2019 05:48:53 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1bb2318a-eb48-450f-908d-a304b92bd74c@googlegroups.com> Subject: How to bind this properly, C ** which is an array From: Lucretia Injection-Date: Fri, 01 Mar 2019 13:48:54 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55736 Date: 2019-03-01T05:48:53-08:00 List-Id: Hi, I'm trying to bind the following struct: typedef struct mpc_ast_t { char *tag; char *contents; mpc_state_t state; int children_num; struct mpc_ast_t** children; } mpc_ast_t; I have this: type ASTs is record Tag : C.Strings.chars_ptr; Contents : C.Strings.chars_ptr; State : States; Number_Of_Children : C.int; Children : System.Address; -- Pointer to a pointer to an array of ASTs. end record with Convention => C; Children needs to be accessed in code as a pointer to a pointer to an array of ASTs. How do I best bind this thing? It's likely going to have to be converted from Address to a particular type using Unchecked_Conversion most likely. Thanks, Luke.