[erlang-questions] C Ports - how to deal wth C function pointers ?

Roberto Saccon <>
Sat Apr 21 05:04:29 CEST 2007


I just stumbled upon this: C-Nodes

http://www.erlang.org/doc/doc-5.5.4/doc/tutorial/cnode.html

I guess this is the way to establish a two-way communication between an
erlang node and a c library

On 4/20/07, Roberto Saccon <> wrote:
>
> I am experimenting with port drivers (building a port driver for cairo
> graphics library). Everything goes well as long as I pass simple arguments
> to call my c library.
>
> But I need to pass a function pointer to the library. And here comes my
> problem. The c library now calls that function. How can I pass its result
> back to Erlang ? Is there a way the c-side can initiate the communication ?
>
> regards
> --
> Roberto Saccon




-- 
Roberto Saccon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070421/0b0ea67e/attachment.html>


More information about the erlang-questions mailing list