Skip to content

Commit a7af537

Browse files
authored
Migrating static nif code for OTP25 (#213)
1 parent d0c96e7 commit a7af537

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

c_src/sqlite3_nif.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#include <string.h>
33
#include <stdio.h>
44

5+
// Elixir workaround for . in module names
6+
#ifdef STATIC_ERLANG_NIF
7+
#define STATIC_ERLANG_NIF_LIBNAME sqlite3_nif
8+
#endif
9+
510
#include <erl_nif.h>
611
#include <sqlite3.h>
712

@@ -966,10 +971,4 @@ static ErlNifFunc nif_funcs[] = {
966971
{"enable_load_extension", 2, exqlite_enable_load_extension, ERL_NIF_DIRTY_JOB_IO_BOUND},
967972
};
968973

969-
// Elixir workaround for . in module names
970-
#ifdef STATIC_ERLANG_NIF
971-
#undef ERL_NIF_INIT_DECL
972-
#define ERL_NIF_INIT_DECL(MODNAME) ErlNifEntry* sqlite3_nif_nif_init(ERL_NIF_INIT_ARGS)
973-
#endif
974-
975974
ERL_NIF_INIT(Elixir.Exqlite.Sqlite3NIF, nif_funcs, on_load, NULL, NULL, on_unload)

0 commit comments

Comments
 (0)