diff options
author | Sverker Eriksson <[email protected]> | 2009-12-09 13:54:24 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-12-09 13:54:24 +0000 |
commit | e2ecf7de626ecc2c60f9c8738c20820d21403d77 (patch) | |
tree | f82fee31dbd03cf242f4e4aad6d62dadc711838e /erts/emulator/beam | |
parent | dd983db48113e78a919d7c6cf3cf3c944e935976 (diff) | |
download | otp-e2ecf7de626ecc2c60f9c8738c20820d21403d77.tar.gz otp-e2ecf7de626ecc2c60f9c8738c20820d21403d77.tar.bz2 otp-e2ecf7de626ecc2c60f9c8738c20820d21403d77.zip |
OTP-8304 Incompatible changes in the experimental NIF feature. Changed the
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index b09f92d342..2cb93112ae 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -631,12 +631,8 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2) for (i=0; i < entry->num_of_funcs && ret==am_ok; i++) { Uint** code_pp; ErlNifFunc* f = &entry->funcs[i]; - if (f->arity > 3) { - ret = load_nif_error(BIF_P,bad_lib,"Function arity too high for NIF %s/%u", - f->name, f->arity); - } - else if (!erts_atom_get(f->name, sys_strlen(f->name), &f_atom) - || (code_pp = get_func_pp(mod->code, f_atom, f->arity))==NULL) { + if (!erts_atom_get(f->name, sys_strlen(f->name), &f_atom) + || (code_pp = get_func_pp(mod->code, f_atom, f->arity))==NULL) { ret = load_nif_error(BIF_P,bad_lib,"Function not found %T:%s/%u", mod_atom, f->name, f->arity); } |