Browse files

add temporary NIF upgrade function to work around a test problem

  • Loading branch information...
1 parent 9a4e3a5 commit de45b2334181ece0ec31e85b81465ce0510b0c69 @vinoski vinoski committed Oct 10, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 c_src/lsm_tree_nifs.c
View
8 c_src/lsm_tree_nifs.c
@@ -1055,4 +1055,10 @@ static int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
return 0;
}
-ERL_NIF_INIT(lsm_tree, nif_funcs, &on_load, NULL, NULL, NULL);
+static int on_upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info)
+{
+ *priv_data = *old_priv_data;
+ return 0;
+}
+
+ERL_NIF_INIT(lsm_tree, nif_funcs, &on_load, NULL, &on_upgrade, NULL);

0 comments on commit de45b23

Please sign in to comment.