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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,57a1144bacb793b9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-11 08:21:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.cesnet.cz!crax.cesnet.cz!news.felk.cvut.cz!not-for-mail From: "Sergey Koshcheyev" Newsgroups: comp.lang.ada Subject: Re: C binding issue Date: Sun, 11 May 2003 17:02:22 +0200 Organization: Czech Technical University Message-ID: References: <20030511004621.63e7fbd9.david@realityrift.com> NNTP-Posting-Host: r2c113.mistral.cz X-Trace: ns.felk.cvut.cz 1052665338 56047 62.245.66.113 (11 May 2003 15:02:18 GMT) X-Complaints-To: usenet@ns.felk.cvut.cz NNTP-Posting-Date: Sun, 11 May 2003 15:02:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:37180 Date: 2003-05-11T17:02:22+02:00 List-Id: "David Holm" wrote in message news:20030511004621.63e7fbd9.david@realityrift.com... > Something like this if I'm not mistaken (been a while since I used callbacks in Ada): > > type size_t_ptr is access all Interfaces.C.size_t; > type Lua_Chunkreader_Proc is access function > (L : Lua_State_Type; Ptr : System.Address; Sz : size_t_ptr) return > Interfaces.C.Strings.chars_ptr; > > > //David Holm I think it is possible to just use an out parameter of type size_t, instead of complicating matters with pointers. Or is there some subtle problem with this approach? Sergey.