diff options
author | Sverker Eriksson <[email protected]> | 2013-02-18 15:09:00 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-02-18 15:20:47 +0100 |
commit | 9a35c01873fb56316136e1314ad6adffe97b9fa5 (patch) | |
tree | a67f86b77f1e08049b51e766468fb63a139d666e /lib/erl_interface/src/encode/encode_pid.c | |
parent | 499eef0cd693b2f96ec19148d2f6666c3df7d834 (diff) | |
download | otp-9a35c01873fb56316136e1314ad6adffe97b9fa5.tar.gz otp-9a35c01873fb56316136e1314ad6adffe97b9fa5.tar.bz2 otp-9a35c01873fb56316136e1314ad6adffe97b9fa5.zip |
erl_interface,ic: Remove node_org_enc from erlang_{pid,port,ref}
in order to be backward compatible with user code that
accesses the members of erlang_pid and friend.
The documentation does not mention the content of these structs,
but we have example code that does. So the safe way it the revert
the node_org_enc field (added in R16A) and instead determine in
runtime which atom encoding to use depending on if the node atom
contains unicode (>255) characters or not.
Diffstat (limited to 'lib/erl_interface/src/encode/encode_pid.c')
-rw-r--r-- | lib/erl_interface/src/encode/encode_pid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/erl_interface/src/encode/encode_pid.c b/lib/erl_interface/src/encode/encode_pid.c index 903c9cce00..86d0f393e5 100644 --- a/lib/erl_interface/src/encode/encode_pid.c +++ b/lib/erl_interface/src/encode/encode_pid.c @@ -26,7 +26,8 @@ int ei_encode_pid(char *buf, int *index, const erlang_pid *p) char *s = buf + *index; ++(*index); /* skip ERL_PID_EXT */ - if (ei_encode_atom_len_as(buf, index, p->node, strlen(p->node), ERLANG_UTF8, p->node_org_enc) < 0) + if (ei_encode_atom_len_as(buf, index, p->node, strlen(p->node), + ERLANG_UTF8, ERLANG_LATIN1|ERLANG_UTF8) < 0) return -1; if (buf) { |