https://github.com/python/cpython
Revision 574547a75c79b506261520c5773ae08a1dcea1b9 authored by Jason R. Coombs on 15 April 2020, 17:55:43 UTC, committed by GitHub on 15 April 2020, 17:55:43 UTC
1 parent 5eca75d
Raw File
Tip revision: 574547a75c79b506261520c5773ae08a1dcea1b9 authored by Jason R. Coombs on 15 April 2020, 17:55:43 UTC
Clean up compatibility code in importlib fixtures (#19156)
Tip revision: 574547a
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 */
back to top