diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 23:40:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 23:40:50 +0400 |
commit | 2497084744b9a106cf200f8f3afa20557e6070b8 (patch) | |
tree | b6b2036aab1cc5ccd3da68bb1a4d74dca31ca5b5 /source/blender/blenlib/BLI_mempool.h | |
parent | fdc336510a16496bf0e215604a5afd976e613940 (diff) |
mempool api cleanup: differentiate mempool functions that allocate a pointer lookup table from allocating the data as a contiguous array,
call these functions BLI_mempool_as_table(), BLI_mempool_as_array(), the N prefixed versions of these functions return newly allocated arrays.
Diffstat (limited to 'source/blender/blenlib/BLI_mempool.h')
-rw-r--r-- | source/blender/blenlib/BLI_mempool.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index a1cbad73239..f8775342e94 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -86,13 +86,26 @@ __attribute__((warn_unused_result)) __attribute__((nonnull(1))) #endif ; -void BLI_mempool_as_array(BLI_mempool *pool, void **data) +void BLI_mempool_as_table(BLI_mempool *pool, void **data) #ifdef __GNUC__ -__attribute__((nonnull(1))) +__attribute__((nonnull(1, 2))) +#endif +; + +void **BLI_mempool_as_tableN(BLI_mempool *pool, const char *allocstr) +#ifdef __GNUC__ +__attribute__((warn_unused_result)) +__attribute__((nonnull(1, 2))) +#endif +; + +void BLI_mempool_as_array(BLI_mempool *pool, void *data) +#ifdef __GNUC__ +__attribute__((nonnull(1, 2))) #endif ; -void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr) +void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr) #ifdef __GNUC__ __attribute__((warn_unused_result)) __attribute__((nonnull(1, 2))) |