diff options
author | Sverker Eriksson <[email protected]> | 2013-01-28 14:32:54 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-01-28 14:32:54 +0100 |
commit | 58482ed3f2b2f90f8be35b85d5d16f3f40f80fa3 (patch) | |
tree | a22f36b6de5d54769d2392b79edf1366964a8a5c /erts/emulator/beam/erl_unicode.c | |
parent | d4fd0da2e1fc541bae7ed2de362f8a5f69357e27 (diff) | |
parent | 6c61689ae326587dfc9bcebd0fc6d6fa40dfd1fb (diff) | |
download | otp-58482ed3f2b2f90f8be35b85d5d16f3f40f80fa3.tar.gz otp-58482ed3f2b2f90f8be35b85d5d16f3f40f80fa3.tar.bz2 otp-58482ed3f2b2f90f8be35b85d5d16f3f40f80fa3.zip |
Merge branch 'sverk/enc_atom-opt'
* sverk/enc_atom-opt:
erts: Optimize atom encoding to use memcpy for pure ascii
erts: Refactor erts_atom_get to use ErtsAtomEncoding
Diffstat (limited to 'erts/emulator/beam/erl_unicode.c')
-rw-r--r-- | erts/emulator/beam/erl_unicode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c index 58202976cf..99108af937 100644 --- a/erts/emulator/beam/erl_unicode.c +++ b/erts/emulator/beam/erl_unicode.c @@ -1905,7 +1905,7 @@ binary_to_atom(Process* proc, Eterm bin, Eterm enc, int must_exist) if (is_non_value(a)) goto badarg; BIF_RET(a); - } else if (erts_atom_get((char *)bytes, bin_size, &a, 1)) { + } else if (erts_atom_get((char *)bytes, bin_size, &a, ERTS_ATOM_ENC_LATIN1)) { erts_free_aligned_binary_bytes(temp_alloc); BIF_RET(a); } else { @@ -1940,7 +1940,7 @@ binary_to_atom(Process* proc, Eterm bin, Eterm enc, int must_exist) ERTS_ATOM_ENC_UTF8, 0); } - else if (!erts_atom_get((char*)bytes, bin_size, &res, 0)) { + else if (!erts_atom_get((char*)bytes, bin_size, &res, ERTS_ATOM_ENC_UTF8)) { goto badarg; } erts_free_aligned_binary_bytes(temp_alloc); |