@@ -47,16 +47,10 @@ typedef struct {
4747#define BITMASK (endian , i ) \
4848 (((char) 1) << ((endian) == ENDIAN_LITTLE ? ((i) % 8) : (7 - (i) % 8)))
4949
50- #ifdef _MSC_VER
51- #define INLINE __inline
52- #else
53- #define INLINE inline
54- #endif
55-
5650/* ------------ low level access to bits in bitarrayobject ------------- */
5751
5852#ifndef NDEBUG
59- static INLINE int GETBIT (bitarrayobject * self , Py_ssize_t i )
53+ static inline int GETBIT (bitarrayobject * self , Py_ssize_t i )
6054{
6155 assert (0 <= i && i < self -> nbits );
6256 return ((self )-> ob_item [(i ) / 8 ] & BITMASK ((self )-> endian , i ) ? 1 : 0 );
@@ -66,7 +60,7 @@ static INLINE int GETBIT(bitarrayobject *self, Py_ssize_t i)
6660 ((self)->ob_item[(i) / 8] & BITMASK((self)->endian, i) ? 1 : 0)
6761#endif
6862
69- static INLINE void
63+ static inline void
7064setbit (bitarrayobject * self , Py_ssize_t i , int bit )
7165{
7266 char * cp , mask ;
@@ -82,7 +76,7 @@ setbit(bitarrayobject *self, Py_ssize_t i, int bit)
8276
8377/* sets unused padding bits (within last byte of buffer) to 0,
8478 and return the number of padding bits -- self->nbits is unchanged */
85- static INLINE int
79+ static inline int
8680setunused (bitarrayobject * self )
8781{
8882 const char mask [16 ] = {
@@ -116,7 +110,7 @@ static const unsigned char bitcount_lookup[256] = {
116110
117111/* Interpret a PyObject (usually PyLong or PyBool) as a bit, return 0 or 1.
118112 On error, return -1 and set error message. */
119- static INLINE int
113+ static inline int
120114pybit_as_int (PyObject * v )
121115{
122116 Py_ssize_t x ;
0 commit comments