diff options
Diffstat (limited to 'contrib/apr/include/apr_allocator.h')
-rw-r--r-- | contrib/apr/include/apr_allocator.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/contrib/apr/include/apr_allocator.h b/contrib/apr/include/apr_allocator.h index 5aaeb1b2faf9..5d6677645db7 100644 --- a/contrib/apr/include/apr_allocator.h +++ b/contrib/apr/include/apr_allocator.h @@ -71,7 +71,8 @@ struct apr_memnode_t { * @param allocator The allocator we have just created. * */ -APR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t **allocator); +APR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t **allocator) + __attribute__((nonnull(1))); /** * Destroy an allocator @@ -79,7 +80,8 @@ APR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t **allocator); * @remark Any memnodes not given back to the allocator prior to destroying * will _not_ be free()d. */ -APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator); +APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator) + __attribute__((nonnull(1))); /** * Allocate a block of mem from the allocator @@ -88,7 +90,8 @@ APR_DECLARE(void) apr_allocator_destroy(apr_allocator_t *allocator); * memnode structure) */ APR_DECLARE(apr_memnode_t *) apr_allocator_alloc(apr_allocator_t *allocator, - apr_size_t size); + apr_size_t size) + __attribute__((nonnull(1))); /** * Free a list of blocks of mem, giving them back to the allocator. @@ -98,7 +101,8 @@ APR_DECLARE(apr_memnode_t *) apr_allocator_alloc(apr_allocator_t *allocator, * @param memnode The memory node to return */ APR_DECLARE(void) apr_allocator_free(apr_allocator_t *allocator, - apr_memnode_t *memnode); + apr_memnode_t *memnode) + __attribute__((nonnull(1,2))); #include "apr_pools.h" @@ -114,13 +118,15 @@ APR_DECLARE(void) apr_allocator_free(apr_allocator_t *allocator, * the allocator will never be destroyed. */ APR_DECLARE(void) apr_allocator_owner_set(apr_allocator_t *allocator, - apr_pool_t *pool); + apr_pool_t *pool) + __attribute__((nonnull(1))); /** * Get the current owner of the allocator * @param allocator The allocator to get the owner from */ -APR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator); +APR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator) + __attribute__((nonnull(1))); /** * Set the current threshold at which the allocator should start @@ -129,7 +135,8 @@ APR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator); * @param size The threshold. 0 == unlimited. */ APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator, - apr_size_t size); + apr_size_t size) + __attribute__((nonnull(1))); #include "apr_thread_mutex.h" @@ -140,14 +147,16 @@ APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator, * @param mutex The mutex */ APR_DECLARE(void) apr_allocator_mutex_set(apr_allocator_t *allocator, - apr_thread_mutex_t *mutex); + apr_thread_mutex_t *mutex) + __attribute__((nonnull(1))); /** * Get the mutex currently set for the allocator * @param allocator The allocator */ APR_DECLARE(apr_thread_mutex_t *) apr_allocator_mutex_get( - apr_allocator_t *allocator); + apr_allocator_t *allocator) + __attribute__((nonnull(1))); #endif /* APR_HAS_THREADS */ |