From 030208c56e5fb09f9d90ce727f327369db610321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 2 Jan 2018 12:44:39 +0100 Subject: Add more *_DECL macros --- nif_helpers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nif_helpers.h') 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) \ -- cgit v1.2.3