aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorManuel Rubio <[email protected]>2017-03-31 01:14:07 +0100
committerManuel Rubio <[email protected]>2017-03-31 01:14:07 +0100
commit74dc036b67427987f54b45beb3adcccd2cf2e27a (patch)
treebcd80b9d3ea43486b11aa77a089bb1c3275cdb80 /erts/emulator/beam
parent5da9e0ab5cb96f2cb37e534b2c1a55c0c2c9783c (diff)
downloadotp-74dc036b67427987f54b45beb3adcccd2cf2e27a.tar.gz
otp-74dc036b67427987f54b45beb3adcccd2cf2e27a.tar.bz2
otp-74dc036b67427987f54b45beb3adcccd2cf2e27a.zip
Add re:version/0
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/bif.tab1
-rw-r--r--erts/emulator/beam/erl_bif_re.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 6f50297fc5..b0819c6427 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -392,6 +392,7 @@ bif erl_ddll:demonitor/1
#
# Bifs in the re module
#
+bif re:version/0
bif re:compile/1
bif re:compile/2
bif re:run/2
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index a66b05c6ff..5dbf2a7de0 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -477,6 +477,17 @@ build_compile_result(Process *p, Eterm error_tag, pcre *result, int errcode, con
* Compile BIFs
*/
+BIF_RETTYPE
+re_version_0(BIF_ALIST_0)
+{
+ Eterm ret;
+ size_t version_size = 0;
+ byte *version = (byte *) erts_pcre_version();
+ version_size = strlen((const char *) version);
+ ret = new_binary(BIF_P, version, version_size);
+ BIF_RET(ret);
+}
+
static BIF_RETTYPE
re_compile(Process* p, Eterm arg1, Eterm arg2)
{