diff options
author | Sverker Eriksson <[email protected]> | 2012-12-21 15:50:21 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-01-08 11:15:01 +0100 |
commit | 685d009efcfd7521e9c918a14b58eac19755299d (patch) | |
tree | 83515a7dcc21f52ecc008bf16da1e7278750e9ca /lib/erl_interface/src/misc/get_type.c | |
parent | e4e007afd032f7aca359d2665f91ddb12727521a (diff) | |
download | otp-685d009efcfd7521e9c918a14b58eac19755299d.tar.gz otp-685d009efcfd7521e9c918a14b58eac19755299d.tar.bz2 otp-685d009efcfd7521e9c918a14b58eac19755299d.zip |
erl_interface: Enable decode of unicode atoms
No API changes or additions. Just the ability for erl_interface to decode
unicode atoms and convert them into latin1 strings to preserve backward
compatibility for the existing API.
Diffstat (limited to 'lib/erl_interface/src/misc/get_type.c')
-rw-r--r-- | lib/erl_interface/src/misc/get_type.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/erl_interface/src/misc/get_type.c b/lib/erl_interface/src/misc/get_type.c index 2a680d0f94..c9a040fbbd 100644 --- a/lib/erl_interface/src/misc/get_type.c +++ b/lib/erl_interface/src/misc/get_type.c @@ -55,10 +55,12 @@ int ei_get_type(const char *buf, const int *index, int *type, int *len) break; case ERL_SMALL_TUPLE_EXT: + case ERL_SMALL_ATOM_EXT: *len = get8(s); break; case ERL_ATOM_EXT: + case ERL_UNICODE_ATOM_EXT: case ERL_STRING_EXT: *len = get16be(s); break; @@ -114,10 +116,14 @@ int ei_get_type_internal(const char *buf, const int *index, *type = get8(s); switch (*type) { + case ERL_SMALL_ATOM_EXT: + *type = ERL_ATOM_EXT; case ERL_SMALL_TUPLE_EXT: *len = get8(s); break; - + + case ERL_UNICODE_ATOM_EXT: + *type = ERL_ATOM_EXT; case ERL_ATOM_EXT: case ERL_STRING_EXT: *len = get16be(s); |