aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-04-23 18:53:51 +0200
committerBjörn Gustavsson <[email protected]>2010-05-17 15:51:50 +0200
commit9d2fe9d9af19ab94ff3feb1e7b9ffd83fa6927ff (patch)
treeb419b5ab967fbc781463d6ab92e1b7539cccd1d8 /erts/emulator/beam/erl_nif.c
parenta6c89679cd6006b3e9839b426159fd4302321528 (diff)
downloadotp-9d2fe9d9af19ab94ff3feb1e7b9ffd83fa6927ff.tar.gz
otp-9d2fe9d9af19ab94ff3feb1e7b9ffd83fa6927ff.tar.bz2
otp-9d2fe9d9af19ab94ff3feb1e7b9ffd83fa6927ff.zip
Add binary:longest_common_prefix/longest_common_suffix
Add allcoator parameter to erts_get_aligned_binary_bytes_extra. Add testcases for the functions above. Add reference implementation for the functions above.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 2790020117..cee4df72a2 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -250,7 +250,7 @@ int enif_is_ref(ErlNifEnv* env, ERL_NIF_TERM term)
static void aligned_binary_dtor(struct enif_tmp_obj_t* obj)
{
- erts_free_aligned_binary_bytes((byte*)obj);
+ erts_free_aligned_binary_bytes_extra((byte*)obj,ERTS_ALC_T_TMP);
}
int enif_inspect_binary(ErlNifEnv* env, Eterm bin_term, ErlNifBinary* bin)
@@ -260,7 +260,7 @@ int enif_inspect_binary(ErlNifEnv* env, Eterm bin_term, ErlNifBinary* bin)
byte* raw_ptr;
}u;
u.tmp = NULL;
- bin->data = erts_get_aligned_binary_bytes_extra(bin_term, &u.raw_ptr,
+ bin->data = erts_get_aligned_binary_bytes_extra(bin_term, &u.raw_ptr, ERTS_ALC_T_TMP,
sizeof(struct enif_tmp_obj_t));
if (bin->data == NULL) {
return 0;