aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_re.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-04-18 17:21:41 +0200
committerGitHub <[email protected]>2017-04-18 17:21:41 +0200
commit6124bfc9b61227a5e82f1d7273d0895e909aac6e (patch)
treeb2a3c2c9d61919526a3fba06b505be079ef29467 /erts/emulator/beam/erl_bif_re.c
parent9e104d8cb7bf78088ed7fb06e1824a299d31c0bc (diff)
parent56c2f180bec77bd17529d61cb65d1884550fcb17 (diff)
downloadotp-6124bfc9b61227a5e82f1d7273d0895e909aac6e.tar.gz
otp-6124bfc9b61227a5e82f1d7273d0895e909aac6e.tar.bz2
otp-6124bfc9b61227a5e82f1d7273d0895e909aac6e.zip
Merge pull request #1412 from manuel-rubio/manuel-rubio/add-re-version
Add re:version/0 OTP-14347
Diffstat (limited to 'erts/emulator/beam/erl_bif_re.c')
-rw-r--r--erts/emulator/beam/erl_bif_re.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index 925d99e0de..a72697eb80 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -512,6 +512,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)
{