about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-11-27 15:13:33 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-11-27 15:13:33 +0000
commit60f60b28a92fdbf2139ff67a95bac996052d7c2b (patch)
tree0067d0a94e957f15b7317dd4c946a93353aed4a6 /src
parent1e9193ed49b89d4895ef6fcd658add257aa446d9 (diff)
downloadskalibs-60f60b28a92fdbf2139ff67a95bac996052d7c2b.tar.gz
skalibs-60f60b28a92fdbf2139ff67a95bac996052d7c2b.tar.xz
skalibs-60f60b28a92fdbf2139ff67a95bac996052d7c2b.zip
Add _PACK and pack/unpack functions for signed types
Diffstat (limited to 'src')
-rw-r--r--src/headers/signed-template7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/headers/signed-template b/src/headers/signed-template
index 2ef6fdd..b67b2bd 100644
--- a/src/headers/signed-template
+++ b/src/headers/signed-template
@@ -1,5 +1,10 @@
-#define @TYPE@_FMT (1+UINT@BITS@_FMT)
+#define @TYPE@_PACK @BYTES@
+#define @type@_pack uint@BITS@_pack
+#define @type@_pack_big uint@BITS@_pack_big
+#define @type@_unpack uint@BITS@_unpack
+#define @type@_unpack_big uint@BITS@_unpack_big
 
+#define @TYPE@_FMT (1+UINT@BITS@_FMT)
 #define @type@_fmt int@BITS@_fmt
 #define @type@_fmtlist int@BITS@_fmtlist
 #define @type@_scan int@BITS@_scan