summaryrefslogtreecommitdiff
path: root/lib/jinterface/java_src
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2022-02-02 11:27:08 +0100
committerSverker Eriksson <sverker@erlang.org>2022-02-02 11:27:08 +0100
commit4622fd1262b1e99741cbd41389f882bb0e44be5d (patch)
tree19125d18f0bfd2d7575f1a2a90bc9d8fca66cf1f /lib/jinterface/java_src
parentf63253ec28b3ea7dee2a2522dd80ef7177f12dff (diff)
parent7856b31d6ec21da431f89af2c77ed6fcd1b135c6 (diff)
downloaderlang-4622fd1262b1e99741cbd41389f882bb0e44be5d.tar.gz
Merge branch 'maint'
Diffstat (limited to 'lib/jinterface/java_src')
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java27
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
index d8f4d442dd..502c830c48 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
@@ -700,24 +700,22 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* the nodename.
*
* @param id
- * an arbitrary number. Only the low order 15 bits will be used.
+ * an arbitrary number.
*
* @param serial
- * another arbitrary number. Only the low order 13 bits will be
- * used.
+ * another arbitrary number.
*
* @param creation
- * yet another arbitrary number. Only the low order 2 bits will
- * be used.
+ * node incarnation number.
*
*/
public void write_pid(final String node, final int id, final int serial,
final int creation) {
write1(OtpExternal.newPidTag);
write_atom(node);
- write4BE(id & 0x7fff); // 15 bits
- write4BE(serial & 0x1fff); // 13 bits
- write1(creation & 0x3); // 2 bits
+ write4BE(id);
+ write4BE(serial);
+ write4BE(creation);
}
/**
@@ -813,12 +811,11 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* the nodename.
*
* @param ids
- * an array of arbitrary numbers. Only the low order 18 bits of
- * the first number will be used. At most three numbers
+ * an array of arbitrary numbers. At most three numbers
* will be read from the array.
*
* @param creation
- * another arbitrary number. Only the low order 2 bits will be used.
+ * another arbitrary number.
*
*/
public void write_ref(final String node, final int[] ids, final int creation) {
@@ -834,13 +831,9 @@ public class OtpOutputStream extends ByteArrayOutputStream {
write_atom(node);
- write1(creation & 0x3); // 2 bits
+ write4BE(creation);
- // first int gets truncated to 18 bits
- write4BE(ids[0] & 0x3ffff);
-
- // remaining ones are left as is
- for (int i = 1; i < arity; i++) {
+ for (int i = 0; i < arity; i++) {
write4BE(ids[i]);
}
}