Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Make it compile with Erlang R17
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Jun 30, 2014
1 parent dab4de6 commit 3b5f7ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 236 deletions.
219 changes: 0 additions & 219 deletions c_src/erl_nif.h

This file was deleted.

34 changes: 17 additions & 17 deletions c_src/erl_nif_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
extern "C" {
#endif /* __cplusplus */

#include "erl_nif.h"

#if ERL_NIF_MAJOR_VERSION == 1 && ERL_NIF_MINOR_VERSION == 0

#define enif_open_resource_type_compat enif_open_resource_type
#define enif_alloc_resource_compat enif_alloc_resource
#define enif_release_resource_compat enif_release_resource
#define enif_alloc_binary_compat enif_alloc_binary
#define enif_realloc_binary_compat enif_realloc_binary
#define enif_release_binary_compat enif_release_binary
#define enif_alloc_compat enif_alloc
#define enif_free_compat enif_free

#endif /* R13B04 */

#if ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION == 0
#include <erl_nif.h>

//#if ERL_NIF_MAJOR_VERSION == 1 && ERL_NIF_MINOR_VERSION == 0
//
//#define enif_open_resource_type_compat enif_open_resource_type
//#define enif_alloc_resource_compat enif_alloc_resource
//#define enif_release_resource_compat enif_release_resource
//#define enif_alloc_binary_compat enif_alloc_binary
//#define enif_realloc_binary_compat enif_realloc_binary
//#define enif_release_binary_compat enif_release_binary
//#define enif_alloc_compat enif_alloc
//#define enif_free_compat enif_free
//
//#endif /* R13B04 */

//#if ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION == 0

#define enif_open_resource_type_compat(E, N, D, F, T) \
enif_open_resource_type(E, NULL, N, D, F, T)
Expand All @@ -46,7 +46,7 @@ extern "C" {
#define enif_free_compat(E, P) \
enif_free(P)

#endif /* R14 */
//#endif /* R14 */



Expand Down

0 comments on commit 3b5f7ea

Please sign in to comment.