Skip to content

Instantly share code, notes, and snippets.

@erszcz
Created September 15, 2014 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erszcz/9ff8a7d308ed4a56c88c to your computer and use it in GitHub Desktop.
Save erszcz/9ff8a7d308ed4a56c88c to your computer and use it in GitHub Desktop.
nif_init(void)
ErlNifFunc funcs[] =
{
{"native_add", 2, native_add}
};
ErlNifEntry* nif_init(void) {
static ErlNifEntry entry = {
2,
6,
"er",
sizeof(funcs) / sizeof(*funcs),
funcs,
((void *)0),
((void *)0),
((void *)0),
((void *)0),
"beam.vanilla"
};
;
return &entry;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment