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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bbbeae4ed07e9626 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Address to function pointer conversion Date: 1997/06/16 Message-ID: #1/1 X-Deja-AN: 248884067 References: <5nrq5h$13cm@info4.rus.uni-stuttgart.de> <5o39sm$2fl6@info4.rus.uni-stuttgart.de> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-06-16T00:00:00+00:00 List-Id: In article <5o39sm$2fl6@info4.rus.uni-stuttgart.de>, Michael Paus wrote: >...The only portable solution I see at the moment is to import the >dlsym function several times for each anticipated function pointer >type. This is not a very nice solution but I think it should work. The above sounds reasonable, if there aren't too many different such function prototypes. On the other hand, if you insist on the flexibility of the unchecked-conversion method, then it might make more sense to unchecked-convert from one access-to-subp type to another (both types being pragma Convention(C)). This is more likely to be portable in practise than unchecked-converting from type System.Address to access-to-subp. No guarantees, of course. - Bob