From 4af25bf765536496ed2b10e22eb4e6e3304b9aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 18 Aug 2020 09:57:41 +0200 Subject: Add LICENSE file and update copyrights --- LICENSE | 13 +++++++++++++ nif_helpers.c | 2 +- nif_helpers.h | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c659f1e --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014-2020, Loïc Hoguin + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/nif_helpers.c b/nif_helpers.c index f29d76d..74be6d4 100644 --- a/nif_helpers.c +++ b/nif_helpers.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2015, Loïc Hoguin +// Copyright (c) 2014-2020, Loïc Hoguin // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above 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 +// Copyright (c) 2014-2020, Loïc Hoguin // // 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) \ -- cgit v1.2.3