Staging
v0.5.1
https://github.com/python/cpython
Revision d648ef10c5c7659ed3c9f34d5c751dc55e2c6007 authored by Charles Burkland on 13 March 2020, 16:04:43 UTC, committed by GitHub on 13 March 2020, 16:04:43 UTC
1 parent 38965ec
Raw File
Tip revision: d648ef10c5c7659ed3c9f34d5c751dc55e2c6007 authored by Charles Burkland on 13 March 2020, 16:04:43 UTC
bpo-36144: Update os.environ and os.environb for PEP 584 (#18911)
Tip revision: d648ef1
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