[Prev][Next][Index][Thread]
Re: FFI question #2: Getting the address of a C function
In article <3978BCC5.AED0DC35@cup.hp.com>,
egouriou@cup.hp.com wrote:
>
>
> oodl@my-deja.com wrote:
> [...]
> > I'm trying to fill in a C struct with C function pointers. I want
to do
> > something like:
> >
> > callbacks.function-1 := address-of-c-function("foo");
>
> This function cannot exist since such functionality is not part
> of the C runtime.
It doesn't have to be a part of the C runtime. The argument
specifying the function name is a string constant (in this case "foo").
I think the address of the C function can be resolved before the Dylan
program starts executing.
My hunch is that the FFI has the functionality I am describing, but it
is not documented. But I could very well be wrong. What does the
"define c-function" macro expand to?
Sent via Deja.com http://www.deja.com/
Before you buy.
Follow-Ups:
References: