Skip to content

Commit

Permalink
allow module upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
velimir committed Jun 20, 2019
1 parent f38c06c commit 978e9ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion c_src/jaypeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,16 @@ static ERL_NIF_TERM decode(ErlNifEnv *env, int argc,
env, enif_make_atom(env, "ok"), bmp_term, properties_term);
}

static int upgrade(ErlNifEnv* env, void** priv, void** old_priv, ERL_NIF_TERM load_info)
{
return 0;
}

static ErlNifFunc nif_funcs[] = {
{"decode", 1, decode}
};

ERL_NIF_INIT(Elixir.Jaypeg, nif_funcs, NULL, NULL, NULL, NULL)
ERL_NIF_INIT(Elixir.Jaypeg, nif_funcs, NULL, NULL, &upgrade, NULL)

/* Local Variables: */
/* c-basic-offset: 2 */
Expand Down

0 comments on commit 978e9ab

Please sign in to comment.