[erlang-questions] FFI for Erlang: patches and draft EEP
Tue Sep 11 15:14:47 CEST 2007
On 9/11/07, Claes Wikstrom <klacke@REDACTED> wrote:
> Alceste Scalas wrote:
> > Hello,
> > some time ago  I asked for comments about extending Erlang/OTP with a
> > Foreign Function Interface (FFI) --- i.e. some new BIFs for calling
> > external C code, with automatic Erlang/C type translations. The
> > response was pretty good.
> Nice work - two questions.
> call erlang--> C and binary() data: Is the binary data copied
> or does the C function get a pointer/size pair - the latter
> would be optimal.
> return C --> erlang - I can't seem to find any ways for the
> C code to return a binary() back to erlang ?? This is IMHO
> :-) You beat me to it!
If the C side uses pointers to the internals of the Erlang binaries, aren't
there going to be some nasty interactions with the garbage collector?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions