Skip to content
Snippets Groups Projects
Commit e78b0f7c authored by Per Hedbor's avatar Per Hedbor
Browse files

BITN was removed from the bitvector.h file

This was done in 44b03690. To compile again,
re-add it here (for now at least)
parent 19e464ce
Branches
Tags
No related merge requests found
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
#define CB_TYPE(name) CONCAT5(cb_, CB_NAMESPACE, _, name, _t) #define CB_TYPE(name) CONCAT5(cb_, CB_NAMESPACE, _, name, _t)
#endif #endif
#define MASK(type, bits) (~((~((type)0)) >> (bits)))
#define BITMASK(type, n) ((type)1 << (type)(sizeof(type)*8 - 1 - (n)))
#define BITN(type, p, n) (!!((p) & BITMASK(type, n)))
typedef struct cb_size { typedef struct cb_size {
size_t bits; size_t bits;
ptrdiff_t chars; ptrdiff_t chars;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment