BLI_bitmap: add allocation from a MemArena.
This commit is contained in:
@@ -59,6 +59,11 @@ typedef unsigned int BLI_bitmap;
|
||||
#define BLI_BITMAP_NEW_ALLOCA(_tot) \
|
||||
((BLI_bitmap *)memset(alloca(BLI_BITMAP_SIZE(_tot)), 0, BLI_BITMAP_SIZE(_tot)))
|
||||
|
||||
/* Allocate using given MemArena */
|
||||
#define BLI_BITMAP_NEW_MEMARENA(_mem, _tot) \
|
||||
(CHECK_TYPE_INLINE(_mem, MemArena *), \
|
||||
((BLI_bitmap *)BLI_memarena_calloc(_mem, BLI_BITMAP_SIZE(_tot))))
|
||||
|
||||
/* get the value of a single bit at '_index' */
|
||||
#define BLI_BITMAP_TEST(_bitmap, _index) \
|
||||
(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
|
||||
|
||||
Reference in New Issue
Block a user