aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2010-11-24 18:28:36 +0100
committerSverker Eriksson <[email protected]>2010-11-24 18:28:36 +0100
commit58733c3ad0b1e60af8f44334998f95199d887ba1 (patch)
tree494b9794e9547b60370106b58e1ed34eb08bde53 /erts/emulator/beam/sys.h
parente15ad4355d1fcbc73454ebc3ce8350a2c9f05069 (diff)
parent454335cd043561cc9fe874bc325c152a0727328b (diff)
downloadotp-58733c3ad0b1e60af8f44334998f95199d887ba1.tar.gz
otp-58733c3ad0b1e60af8f44334998f95199d887ba1.tar.bz2
otp-58733c3ad0b1e60af8f44334998f95199d887ba1.zip
Merge branch 'sverker/ets_compress/OTP-8922' into dev
* sverker/ets_compress/OTP-8922: ETS 'compressed' option.
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 93203a08a9..0d15272aa8 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -1166,6 +1166,15 @@ void* sys_calloc2(Uint, Uint);
((char*)(s))[3] = (char)(i) & 0xff;} \
while (0)
+#define get_int24(s) ((((unsigned char*) (s))[0] << 16) | \
+ (((unsigned char*) (s))[1] << 8) | \
+ (((unsigned char*) (s))[2]))
+
+#define put_int24(i, s) do {((char*)(s))[0] = (char)((i) >> 16) & 0xff; \
+ ((char*)(s))[1] = (char)((i) >> 8) & 0xff; \
+ ((char*)(s))[2] = (char)(i) & 0xff;} \
+ while (0)
+
#define get_int16(s) ((((unsigned char*) (s))[0] << 8) | \
(((unsigned char*) (s))[1]))
@@ -1179,6 +1188,7 @@ void* sys_calloc2(Uint, Uint);
#define put_int8(i, s) do {((unsigned char*)(s))[0] = (i) & 0xff;} while (0)
+
/*
* Use DEBUGF as you would use printf, but use double parentheses:
*