diff options
author | Henrik Nord <[email protected]> | 2011-10-18 16:20:28 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-10-18 16:20:28 +0200 |
commit | 02ec67177b2f5d2de371362e5bb3c9b9771fb0b8 (patch) | |
tree | 1a7e5332778088276b289afc5a560062bec6972f /erts/emulator/beam | |
parent | 852827dab8fa74167f9a000998304e3961010797 (diff) | |
parent | 8db78b0c92a26e2a7766f8ece2f0ed7abb5db791 (diff) | |
download | otp-02ec67177b2f5d2de371362e5bb3c9b9771fb0b8.tar.gz otp-02ec67177b2f5d2de371362e5bb3c9b9771fb0b8.tar.bz2 otp-02ec67177b2f5d2de371362e5bb3c9b9771fb0b8.zip |
Merge branch 'fm/enif_is_number'
* fm/enif_is_number:
Add NIF function enif_is_number
Conflicts:
erts/emulator/beam/erl_nif_api_funcs.h
OTP-9629
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 5 | ||||
-rw-r--r-- | erts/emulator/beam/erl_nif_api_funcs.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index f3db3f9326..51f1fad811 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -435,6 +435,11 @@ int enif_is_exception(ErlNifEnv* env, ERL_NIF_TERM term) return term == THE_NON_VALUE; } +int enif_is_number(ErlNifEnv* env, ERL_NIF_TERM term) +{ + return is_number(term); +} + static void aligned_binary_dtor(struct enif_tmp_obj_t* obj) { erts_free_aligned_binary_bytes_extra((byte*)obj,ERTS_ALC_T_TMP); diff --git a/erts/emulator/beam/erl_nif_api_funcs.h b/erts/emulator/beam/erl_nif_api_funcs.h index 4af9f61000..18f2c022eb 100644 --- a/erts/emulator/beam/erl_nif_api_funcs.h +++ b/erts/emulator/beam/erl_nif_api_funcs.h @@ -137,6 +137,7 @@ ERL_NIF_API_FUNC_DECL(ERL_NIF_TERM,enif_make_uint64,(ErlNifEnv*, ErlNifUInt64)); #endif ERL_NIF_API_FUNC_DECL(int,enif_is_exception,(ErlNifEnv*, ERL_NIF_TERM term)); ERL_NIF_API_FUNC_DECL(int,enif_make_reverse_list,(ErlNifEnv*, ERL_NIF_TERM term, ERL_NIF_TERM *list)); +ERL_NIF_API_FUNC_DECL(int,enif_is_number,(ErlNifEnv*, ERL_NIF_TERM term)); /* ** Add new entries here to keep compatibility on Windows!!! @@ -258,6 +259,7 @@ ERL_NIF_API_FUNC_DECL(int,enif_make_reverse_list,(ErlNifEnv*, ERL_NIF_TERM term, # define enif_is_exception ERL_NIF_API_FUNC_MACRO(enif_is_exception) # define enif_make_reverse_list ERL_NIF_API_FUNC_MACRO(enif_make_reverse_list) +# define enif_is_number ERL_NIF_API_FUNC_MACRO(enif_is_number) /* ** Add new entries here |