diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-03-01 19:41:04 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-03-01 19:41:04 +0100 |
| commit | 465749ec6de871ae244ebe6d3264c71eeb728fcc (patch) | |
| tree | d14bffe84132f80fc8edd266287bec3dff224e84 /src/internals.h | |
| parent | zsetu: change macro from CHARS_PER_TYPE to SIZE_MULTIPLE (diff) | |
| download | libzahl-465749ec6de871ae244ebe6d3264c71eeb728fcc.tar.gz libzahl-465749ec6de871ae244ebe6d3264c71eeb728fcc.tar.bz2 libzahl-465749ec6de871ae244ebe6d3264c71eeb728fcc.tar.xz | |
Add typedef zahl_char_t for internal use
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/internals.h')
| -rw-r--r-- | src/internals.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/internals.h b/src/internals.h index cc2d034..df973fb 100644 --- a/src/internals.h +++ b/src/internals.h @@ -2,8 +2,10 @@ #include "../zahl.h" #define BITS_PER_CHAR 32 -#define FLOOR_BITS_TO_CHARS(bits) ((bits) >> 5) -#define CEILING_BITS_TO_CHARS(bits) (((bits) + (BITS_PER_CHAR - 1)) >> 5) +#define LB_BITS_PER_CHAR 5 + +#define FLOOR_BITS_TO_CHARS(bits) ((bits) >> LB_BITS_PER_CHAR) +#define CEILING_BITS_TO_CHARS(bits) (((bits) + (BITS_PER_CHAR - 1)) >> LB_BITS_PER_CHAR) #define BITS_IN_LAST_CHAR(bits) ((bits) & (BITS_PER_CHAR - 1)) #define LIST_TEMPS\ |
