Commit da558403a20b998c3135f7abbd69ccbd61753a09

Thomas de Grivel 2022-06-17T09:26:12

reload nif

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/c_src/git_nif.c b/c_src/git_nif.c
index 2af4e43..cc2ccb1 100644
--- a/c_src/git_nif.c
+++ b/c_src/git_nif.c
@@ -794,4 +794,15 @@ static ErlNifFunc funcs[] = {
   {"tags_nif",     1, tags_nif,     0}
 };
 
-ERL_NIF_INIT(Elixir.Kmxgit.Git, funcs, load, NULL, NULL, unload);
+int upgrade (ErlNifEnv* env, void** priv_data, void** old_priv_data,
+             ERL_NIF_TERM load_info)
+{
+  (void) env;
+  (void) priv_data;
+  (void) old_priv_data;
+  (void) load_info;
+  fprintf(stderr, "git_nif upgrade\n");
+  return 0;
+}
+
+ERL_NIF_INIT(Elixir.Kmxgit.Git, funcs, load, NULL, upgrade, unload);