aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/nif_SUITE_data
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-06-30 14:33:28 +0200
committerLukas Larsson <[email protected]>2011-06-30 14:33:28 +0200
commit256391d4f9b7425fd96b5b9f344b212751bdfda2 (patch)
tree854f354b294af4b3bc5cd646768291d0b1b3c431 /erts/emulator/test/nif_SUITE_data
parent12ecb8c36fd00fff873f3bcaf8ffd53d5f2fb31f (diff)
downloadotp-256391d4f9b7425fd96b5b9f344b212751bdfda2.tar.gz
otp-256391d4f9b7425fd96b5b9f344b212751bdfda2.tar.bz2
otp-256391d4f9b7425fd96b5b9f344b212751bdfda2.zip
Added enif_get_reverse_list to nif API
Diffstat (limited to 'erts/emulator/test/nif_SUITE_data')
-rw-r--r--erts/emulator/test/nif_SUITE_data/nif_SUITE.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
index 0bb93daa33..87b4d4c4ed 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
+++ b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
@@ -1373,6 +1373,14 @@ static ERL_NIF_TERM send_term(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
return enif_make_int(env, ret);
}
+static ERL_NIF_TERM reverse_list(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {
+ ERL_NIF_TERM rev_list;
+
+ if(!enif_get_reverse_list(env, argv[0], &rev_list))
+ return enif_make_atom(env, "badarg");
+ return rev_list;
+}
+
static ErlNifFunc nif_funcs[] =
{
{"lib_version", 0, lib_version},
@@ -1417,7 +1425,8 @@ static ErlNifFunc nif_funcs[] =
{"send_blob_thread", 3, send_blob_thread},
{"join_send_thread", 1, join_send_thread},
{"copy_blob", 1, copy_blob},
- {"send_term", 2, send_term}
+ {"send_term", 2, send_term},
+ {"reverse_list",1, reverse_list}
};
ERL_NIF_INIT(nif_SUITE,nif_funcs,load,reload,upgrade,unload)