[erlang-questions] erl_nif interface

Aleksey Eschenko <>
Tue Mar 30 17:08:19 CEST 2010


static ERL_NIF_TERM increase(ErlNifEnv* env, ERL_NIF_TERM a1)
should now be
static ERL_NIF_TERM increase(ErlNifEnv* env, int argc, const
ERL_NIF_TERM argv[])

See http://www.erlang.org/doc/man/erl_nif.html


2010/3/30 William v Doorn <>:
> Hello all,
>
> I'm pretty new to Erlang and decided to try out the erl_nif interface. I
> tried to make a simple counter, but I can't get it to work. It seems to go
> wrong at enif_make_int, where it seems to return the memory address instead
> of the integer itself.
>
> I've included these things in the paste:
>
> - C code using erl_nif
> - Erlang module
> - Interpreter session
>
> http://gist.github.com/348161
>
> Thanks,
>
> William van Doorn
>


More information about the erlang-questions mailing list