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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32d4b7099c3e0137 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-25 13:26:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-win.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C code to Ada References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 25 Jan 2003 21:28:27 +0000 NNTP-Posting-Host: 80.4.70.148 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-win.server.ntli.net 1043529996 80.4.70.148 (Sat, 25 Jan 2003 21:26:36 GMT) NNTP-Posting-Date: Sat, 25 Jan 2003 21:26:36 GMT Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:33428 Date: 2003-01-25T21:28:27+00:00 List-Id: sk wrote: > Hi yet again, > > Since I messed it all up pretty bad, here you go ... > (feel free to clean it up, thicken it and release it > back to CLA, hint hint :-) ok I've gotten to the point where I've tidied it up, added separate handle types for libraries and code within the library, and added a few modes that where missing (I am waiting to finish the adainit & adafinal calls and write an example before I email you sk). Now I'm in the process of writing nice tidy calls to adainit & adafinal - code that will be called over and over - and am a bit confused. Should I use ada.unchecked_conversion (which works in the example) or system.address_to_access_conversion? (or something else entirely?). I was going to use an address_to_access_conversion but wouldn't that give an access to an access to a procedure for the following type? type Procedure_Access is access procedure; The package instantiation would be package X is new System.Address_To_Access_Conversion (Procedure_Access); What's the best way to do the conversion so the procedure can be called? In the meantime I will stick with Unchecked_Conversion, which works *here* even if it's a bit risky. Chris