comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/bitset.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1
2 #ifndef Py_BITSET_H
3 #define Py_BITSET_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 /* Bitset interface */
9
10 #define BYTE char
11 typedef BYTE *bitset;
12
13 #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
14
15 #define BITSPERBYTE (8*sizeof(BYTE))
16 #define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
17 #define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
18 #define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
19
20 #ifdef __cplusplus
21 }
22 #endif
23 #endif /* !Py_BITSET_H */