diff options
author | Loïc Hoguin <[email protected]> | 2018-01-02 12:44:39 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-01-02 12:44:39 +0100 |
commit | 030208c56e5fb09f9d90ce727f327369db610321 (patch) | |
tree | 17b9ba33cde602c78ebb2c361fa935d53ae9ee10 | |
parent | ad0f2974c7af51e4dea8b887c1c70c82f1a4599d (diff) | |
download | nif_helpers-030208c56e5fb09f9d90ce727f327369db610321.tar.gz nif_helpers-030208c56e5fb09f9d90ce727f327369db610321.tar.bz2 nif_helpers-030208c56e5fb09f9d90ce727f327369db610321.zip |
Add more *_DECL macros
-rw-r--r-- | nif_helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nif_helpers.h b/nif_helpers.h index eb5fcf5..97cb803 100644 --- a/nif_helpers.h +++ b/nif_helpers.h @@ -89,6 +89,7 @@ \ return 1; \ } +#define NIF_LIST_TO_FLAGS_FUNCTION_DECL(f, type) int f(ErlNifEnv*, ERL_NIF_TERM, type*); #define NIF_FLAG_CONS_LIST(a, f) if (flags & f) list = enif_make_list_cell(env, atom_ ## a, list); #define NIF_FLAGS_TO_LIST_FUNCTION(f, type, flags_list) \ @@ -98,6 +99,7 @@ flags_list(NIF_FLAG_CONS_LIST); \ return list; \ } +#define NIF_FLAGS_TO_LIST_FUNCTION_DECL(f, type) ERL_NIF_TERM f(ErlNifEnv*, type); #define NIF_ATOM_TO_ENUM(a, e) if (enif_is_identical(atom_ ## a, atom)) { *val = e; return 1; } #define NIF_ATOM_TO_ENUM_FUNCTION(f, type, enum_list) \ |