Skip to content
Browse files

use ERL_NIF_RT_TAKEOVER resource type flag

  • Loading branch information...
1 parent 11bdcc5 commit d6b97da00a143547daac4c52e1c9522636c145d5 @vinoski committed Mar 11, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 c_src/erlsha2_nif.c
View
10 c_src/erlsha2_nif.c
@@ -771,8 +771,14 @@ context_dtor(ErlNifEnv* env, void* obj)
static int
nifload(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
{
- *priv_data = enif_open_resource_type(env, NULL, "erlsha2_context",
- context_dtor, ERL_NIF_RT_CREATE, NULL);
+ *priv_data = enif_open_resource_type(
+ env,
+ NULL,
+ "erlsha2_context",
+ context_dtor,
+ ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER,
+ NULL
+ );
return 0;
}

0 comments on commit d6b97da

Please sign in to comment.
Something went wrong with that request. Please try again.