Staging
v0.5.1
https://github.com/python/cpython
Revision ce0a2a86207dacc1945c6d756527226d8feed0e0 authored by Miss Islington (bot) on 07 December 2019, 11:41:41 UTC, committed by GitHub on 07 December 2019, 11:41:41 UTC
(cherry picked from commit 969ae7aca809a8dacafee04c261110eea0ac1945)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
1 parent 7fde4f4
Raw File
Tip revision: ce0a2a86207dacc1945c6d756527226d8feed0e0 authored by Miss Islington (bot) on 07 December 2019, 11:41:41 UTC
Make repr of C accelerated TaskWakeupMethWrapper the same as of pure Python version (GH-17484)
Tip revision: ce0a2a8
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