comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: Re: C code to Ada
Date: Sat, 25 Jan 2003 21:28:27 +0000
Date: 2003-01-25T21:28:27+00:00	[thread overview]
Message-ID: <giDY9.3794$RZ.37344@newsfep4-win.server.ntli.net> (raw)
In-Reply-To: <mailman.5.1043112025.4961.comp.lang.ada@ada.eu.org>

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




  reply	other threads:[~2003-01-25 21:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-20 18:44 C code to Ada chris.danx
2003-01-20 21:33 ` sk
2003-01-20 21:43   ` chris.danx
2003-01-20 22:56     ` James S. Rogers
2003-01-20 23:05       ` chris.danx
2003-01-21  2:17       ` Jeffrey Carter
2003-01-20 23:32     ` sk
2003-01-21  0:56       ` chris.danx
2003-01-21  1:26         ` sk
2003-01-21 15:49           ` Frank J. Lhota
2003-01-22  1:05           ` chris.danx
2003-01-21  2:27   ` Jeffrey Carter
2003-01-21  2:55     ` sk
2003-01-21 19:33       ` Jeffrey Carter
2003-01-21  6:18     ` Simon Wright
     [not found] ` <3E2C6B2B.5090600@noname.com>
2003-01-20 21:39   ` sk
2003-01-21  1:23 ` sk
2003-01-25 21:28   ` chris.danx [this message]
2003-01-26  2:16     ` sk
2003-01-26  3:04     ` sk
     [not found]     ` <3E33502D.7030503@noname.com>
2003-01-26  5:37       ` sk
2003-01-23  8:00 ` sk
2003-01-24 18:03   ` chris.danx
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox