diff options
Diffstat (limited to 'nif_helpers.h')
-rw-r--r-- | nif_helpers.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nif_helpers.h b/nif_helpers.h index 97cb803..e9a2f72 100644 --- a/nif_helpers.h +++ b/nif_helpers.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2015, Loïc Hoguin <[email protected]> +// Copyright (c) 2014-2020, Loïc Hoguin <[email protected]> // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above @@ -101,6 +101,7 @@ } #define NIF_FLAGS_TO_LIST_FUNCTION_DECL(f, type) ERL_NIF_TERM f(ErlNifEnv*, type); +// @todo Not sure why we have the env here. Doesn't seem necessary. #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) \ int f(ErlNifEnv* env, ERL_NIF_TERM atom, type* val) \ |