diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-11-27 15:13:33 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-11-27 15:13:33 +0000 |
commit | 60f60b28a92fdbf2139ff67a95bac996052d7c2b (patch) | |
tree | 0067d0a94e957f15b7317dd4c946a93353aed4a6 /src/headers | |
parent | 1e9193ed49b89d4895ef6fcd658add257aa446d9 (diff) | |
download | skalibs-60f60b28a92fdbf2139ff67a95bac996052d7c2b.tar.xz |
Add _PACK and pack/unpack functions for signed types
Diffstat (limited to 'src/headers')
-rw-r--r-- | src/headers/signed-template | 7 |
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 |