diff options
author | Björn Gustavsson <[email protected]> | 2014-08-14 13:21:20 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-08-14 13:21:20 +0200 |
commit | d7e30235432774fa12211139c68165f4e21055bd (patch) | |
tree | 07b3e6f544372221942e5c803b9ba33c796434fa /erts/emulator | |
parent | 5159961b2b9c23e764ee27dd2806432794764d46 (diff) | |
parent | 7ff17ddfd337d1c49c1174d8d24b2ce0671b2c9e (diff) | |
download | otp-d7e30235432774fa12211139c68165f4e21055bd.tar.gz otp-d7e30235432774fa12211139c68165f4e21055bd.tar.bz2 otp-d7e30235432774fa12211139c68165f4e21055bd.zip |
Merge branch 'bjorn/erts/export-bifs/OTP-12099'
* bjorn/erts/export-bifs/OTP-12099:
BIFs should be considered exported
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/bif.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index fcbeb6cf5c..4a84dcfe34 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -3989,16 +3989,19 @@ BIF_RETTYPE halt_2(BIF_ALIST_2) BIF_RETTYPE function_exported_3(BIF_ALIST_3) { + int arity; if (is_not_atom(BIF_ARG_1) || is_not_atom(BIF_ARG_2) || is_not_small(BIF_ARG_3)) { BIF_ERROR(BIF_P, BADARG); } - if (erts_find_function(BIF_ARG_1, BIF_ARG_2, signed_val(BIF_ARG_3), - erts_active_code_ix()) == NULL) { - BIF_RET(am_false); + arity = signed_val(BIF_ARG_3); + if (erts_find_function(BIF_ARG_1, BIF_ARG_2, arity, + erts_active_code_ix()) != NULL || + erts_is_builtin(BIF_ARG_1, BIF_ARG_2, arity)) { + BIF_RET(am_true); } - BIF_RET(am_true); + BIF_RET(am_false); } /**********************************************************************/ |