diff options
author | Bruce Yinhe <[email protected]> | 2014-11-07 11:05:24 +0100 |
---|---|---|
committer | Bruce Yinhe <[email protected]> | 2014-11-07 11:05:24 +0100 |
commit | 983a39ab079c9f825d31cfe349588a76824d8ef2 (patch) | |
tree | 3c786022f024d95596b241ec09de792f84afc381 /erts/emulator/beam/erl_bif_info.c | |
parent | 9884666f91519bec7f63fe925857811cf6385cf7 (diff) | |
parent | 1bc59d68f5d22650fa18aa064ed8e50fc9a6a216 (diff) | |
download | otp-983a39ab079c9f825d31cfe349588a76824d8ef2.tar.gz otp-983a39ab079c9f825d31cfe349588a76824d8ef2.tar.bz2 otp-983a39ab079c9f825d31cfe349588a76824d8ef2.zip |
Merge branch 'lemenkov/expose_nif_version' into maint
OTP-12298
* lemenkov/expose_nif_version:
Expose NIF version
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 0a8f0b5758..b90362d82c 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -27,6 +27,7 @@ #include "erl_process.h" #include "error.h" #include "erl_driver.h" +#include "erl_nif.h" #include "bif.h" #include "big.h" #include "erl_version.h" @@ -2459,6 +2460,13 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1) ERL_DRV_EXTENDED_MINOR_VERSION); hp = HAlloc(BIF_P, 2*n); BIF_RET(buf_to_intlist(&hp, buf, n, NIL)); + } else if (ERTS_IS_ATOM_STR("nif_version", BIF_ARG_1)) { + char buf[42]; + int n = erts_snprintf(buf, 42, "%d.%d", + ERL_NIF_MAJOR_VERSION, + ERL_NIF_MINOR_VERSION); + hp = HAlloc(BIF_P, 2*n); + BIF_RET(buf_to_intlist(&hp, buf, n, NIL)); } else if (ERTS_IS_ATOM_STR("smp_support", BIF_ARG_1)) { #ifdef ERTS_SMP BIF_RET(am_true); |