aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/big.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-03-20 15:42:34 +0100
committerSverker Eriksson <[email protected]>2019-03-22 19:40:36 +0100
commitbd8f6106d44a58c261920eef72842bb3bc5a4968 (patch)
tree7472e2c80a2ee885cfcf767b0cb541a3417c0fd6 /erts/emulator/beam/big.c
parente2cf4a8a4b03b9f430ba228276c3b2629159e832 (diff)
downloadotp-bd8f6106d44a58c261920eef72842bb3bc5a4968.tar.gz
otp-bd8f6106d44a58c261920eef72842bb3bc5a4968.tar.bz2
otp-bd8f6106d44a58c261920eef72842bb3bc5a4968.zip
epmd: Support 32-bit creation values in local node
* Increase distribution version from 5 to 6 * Introduce new ALIVE2_X_RESP with 32-bit creation as reply to ALIVE2_REQ when sender dist version >= 6 * Still reply old ALIVE2_RESP with tiny creation 1..3 if sender dist version < 6.
Diffstat (limited to 'erts/emulator/beam/big.c')
-rw-r--r--erts/emulator/beam/big.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c
index 522f50287a..7666f23a4f 100644
--- a/erts/emulator/beam/big.c
+++ b/erts/emulator/beam/big.c
@@ -2176,6 +2176,24 @@ term_to_Uint64(Eterm term, Uint64 *up)
#endif
}
+int
+term_to_Uint32(Eterm term, Uint32 *up)
+{
+#if ERTS_SIZEOF_ETERM == 4
+ return term_to_Uint(term,up);
+#else
+ if (is_small(term)) {
+ Sint i = signed_val(term);
+ if (i >= 0) {
+ *up = (Uint32) i;
+ return 1;
+ }
+ }
+ *up = BADARG;
+ return 0;
+#endif
+}
+
int term_to_Sint(Eterm term, Sint *sp)
{