aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/atom.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-01-24 19:22:59 +0100
committerSverker Eriksson <[email protected]>2013-01-25 15:37:22 +0100
commit120d84e2eb38a98ff2c187c27ac53b49cc9e863a (patch)
tree5011e7c314a4208a7ab35e310f06c4e1b23ef589 /erts/emulator/beam/atom.c
parentbe062ca7528b3267a6ef08653b001913fc12ae8e (diff)
downloadotp-120d84e2eb38a98ff2c187c27ac53b49cc9e863a.tar.gz
otp-120d84e2eb38a98ff2c187c27ac53b49cc9e863a.tar.bz2
otp-120d84e2eb38a98ff2c187c27ac53b49cc9e863a.zip
erts: Refactor erts_atom_get to use ErtsAtomEncoding
instead of 'is_latin1' boolean argument.
Diffstat (limited to 'erts/emulator/beam/atom.c')
-rw-r--r--erts/emulator/beam/atom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/atom.c b/erts/emulator/beam/atom.c
index 82dd320ea9..f2ab3e0559 100644
--- a/erts/emulator/beam/atom.c
+++ b/erts/emulator/beam/atom.c
@@ -367,7 +367,7 @@ int atom_table_sz(void)
}
int
-erts_atom_get(const char *name, int len, Eterm* ap, int is_latin1)
+erts_atom_get(const char *name, int len, Eterm* ap, ErtsAtomEncoding enc)
{
byte utf8_copy[MAX_ATOM_SZ_FROM_LATIN1];
Atom a;
@@ -376,7 +376,7 @@ erts_atom_get(const char *name, int len, Eterm* ap, int is_latin1)
a.len = (Sint16) len;
a.name = (byte *)name;
- if (is_latin1) {
+ if (enc == ERTS_ATOM_ENC_LATIN1) {
latin1_to_utf8(utf8_copy, (const byte**)&a.name, &len);
a.len = (Sint16) len;
}