diff options
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r-- | include/my_bitmap.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 488c41ffb22..ab69b2d671d 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -41,6 +41,7 @@ typedef struct st_bitmap #ifdef __cplusplus extern "C" { #endif +extern void create_last_word_mask(MY_BITMAP *map); extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, my_bool thread_safe); extern my_bool bitmap_is_clear_all(const MY_BITMAP *map); @@ -103,6 +104,17 @@ extern void bitmap_lock_invert(MY_BITMAP *map); &= ~ (1 << ((BIT) & 7))) #define _bitmap_is_set(MAP, BIT) (uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ & (1 << ((BIT) & 7))) +/* + WARNING! + + The below symbols are inline functions in DEBUG builds and macros in + non-DEBUG builds. The latter evaluate their 'bit' argument twice. + + NEVER use an increment/decrement operator with the 'bit' argument. + It would work with DEBUG builds, but fails later in production builds! + + FORBIDDEN: bitmap_set_bit($my_bitmap, (field++)->field_index); +*/ #ifndef DBUG_OFF static inline void bitmap_set_bit(MY_BITMAP *map,uint bit) |