mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 924392 - part 2 - don't use JS_BITS_PER_WORD for jsbitmap; r=Waldo
This commit is contained in:
parent
ea41824c7e
commit
778bf2197f
@ -345,12 +345,13 @@ JS_DumpHistogram(JSBasicStats *bs, FILE *fp);
|
||||
|
||||
/* A jsbitmap_t is a long integer that can be used for bitmaps. */
|
||||
typedef size_t jsbitmap;
|
||||
#define JS_TEST_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] & \
|
||||
((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1))))
|
||||
#define JS_SET_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] |= \
|
||||
((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1))))
|
||||
#define JS_CLEAR_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] &= \
|
||||
~((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1))))
|
||||
#define JS_BITMAP_NBITS (sizeof(jsbitmap) * CHAR_BIT)
|
||||
#define JS_TEST_BIT(_map,_bit) ((_map)[(_bit)/JS_BITMAP_NBITS] & \
|
||||
(jsbitmap(1)<<((_bit)%JS_BITMAP_NBITS)))
|
||||
#define JS_SET_BIT(_map,_bit) ((_map)[(_bit)/JS_BITMAP_NBITS] |= \
|
||||
(jsbitmap(1)<<((_bit)%JS_BITMAP_NBITS)))
|
||||
#define JS_CLEAR_BIT(_map,_bit) ((_map)[(_bit)/JS_BITMAP_NBITS] &= \
|
||||
~(jsbitmap(1)<<((_bit)%JS_BITMAP_NBITS)))
|
||||
|
||||
/* Wrapper for various macros to stop warnings coming from their expansions. */
|
||||
#if defined(__clang__)
|
||||
|
Loading…
Reference in New Issue
Block a user