- The NIF concept was introduced in R13B03 as an
- EXPERIMENTAL feature. The interfaces may be changed in any way
- in coming releases. The plan is however to lift the experimental label and
- maintain interface backward compatibility from R14B.
- Incompatible changes in R14A:
+ The NIF concept is officially supported from R14B. NIF source code
+ written for earlier experimental versions might need adaption to run on R14B.
+ No incompatible changes between R14B and R14A.
+ Incompatible changes between R14A and R13B04:
- Environment argument removed for enif_alloc,
enif_realloc, enif_free, enif_alloc_binary,
@@ -50,14 +49,14 @@
- Module argument added to enif_open_resource_type
while changing name spaces of resource types from global to module local.
- Incompatible changes in R13B04:
+ Incompatible changes between R13B04 and R13B03:
- The function prototypes of the NIFs have changed to expect argc and argv
arguments. The arity of a NIF is by that no longer limited to 3.
- enif_get_data renamed as enif_priv_data.
- enif_make_string got a third argument for character encoding.
-
+
A NIF library contains native implementation of some functions
of an Erlang module. The native implemented functions (NIFs) are
--
cgit v1.2.3
From 0045a2ef8ea300eb2dee2b3aaadc6b5f08f5d4c4 Mon Sep 17 00:00:00 2001
From: Patrik Nyblom
Date: Tue, 10 Aug 2010 15:17:42 +0200
Subject: Teach Windows about the int64 functions
---
erts/emulator/beam/erl_nif_api_funcs.h | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'erts')
diff --git a/erts/emulator/beam/erl_nif_api_funcs.h b/erts/emulator/beam/erl_nif_api_funcs.h
index d538200860..eca506593d 100644
--- a/erts/emulator/beam/erl_nif_api_funcs.h
+++ b/erts/emulator/beam/erl_nif_api_funcs.h
@@ -236,6 +236,13 @@ ERL_NIF_API_FUNC_DECL(ERL_NIF_TERM,enif_make_uint64,(ErlNifEnv*, ErlNifUInt64));
# define enif_get_local_pid ERL_NIF_API_FUNC_MACRO(enif_get_local_pid)
# define enif_keep_resource ERL_NIF_API_FUNC_MACRO(enif_keep_resource)
# define enif_make_resource_binary ERL_NIF_API_FUNC_MACRO(enif_make_resource_binary)
+#if SIZEOF_LONG != 8
+# define enif_get_int64 ERL_NIF_API_FUNC_MACRO(enif_get_int64)
+# define enif_get_uint64 ERL_NIF_API_FUNC_MACRO(enif_get_uint64)
+# define enif_make_int64 ERL_NIF_API_FUNC_MACRO(enif_make_int64)
+# define enif_make_uint64 ERL_NIF_API_FUNC_MACRO(enif_make_uint64)
+#endif
+
#endif
#ifndef enif_make_list1
--
cgit v1.2.3
From 88def63e43ca7f9f3914b7e7c58dc50282c00f53 Mon Sep 17 00:00:00 2001
From: Patrik Nyblom
Date: Wed, 11 Aug 2010 12:06:12 +0200
Subject: Make windows 64bit types be declared more consistently
---
erts/emulator/beam/erl_nif.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'erts')
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index 533c92cb28..ee3a7cd5f4 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -66,7 +66,7 @@
extern "C" {
#endif
-#if defined(__WIN32__)
+#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
typedef unsigned __int64 ErlNifUInt64;
typedef __int64 ErlNifSInt64;
#elif SIZEOF_LONG == 8
--
cgit v1.2.3