Staging
v0.8.1
v0.8.1
Revision 2bd31b5fde32194a63ca1e782e2578c6bd2ba759 authored by Łukasz Langa on 16 September 2020, 21:23:13 UTC, committed by Łukasz Langa on 16 September 2020, 21:23:13 UTC
1 parent 48f9925
bitset.h
#ifndef Py_BITSET_H
#define Py_BITSET_H
#ifdef __cplusplus
extern "C" {
#endif
/* Bitset interface */
#define BYTE char
typedef BYTE *bitset;
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
#define BITSPERBYTE (8*sizeof(BYTE))
#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
#ifdef __cplusplus
}
#endif
#endif /* !Py_BITSET_H */
Computing file changes ...