Tue, 05 Oct 2021 12:25:23 +0200
remove redundant documentation for function pointers
src/cx/allocator.h | file | annotate | diff | comparison | revisions |
--- a/src/cx/allocator.h Tue Oct 05 12:23:46 2021 +0200 +++ b/src/cx/allocator.h Tue Oct 05 12:25:23 2021 +0200 @@ -44,46 +44,23 @@ */ typedef struct { /** - * Allocate \p n bytes of memory. - * - * @param data the allocator's data - * @param n the number of bytes - * @return a pointer to the allocated memory + * The allocator's malloc() implementation. */ void *(*malloc)(void *data, size_t n); /** - * Re-allocate the previously allocated block in \p mem, making the new block \p n bytes long. - * This function may return the same pointer that was passed to it, if moving the memory - * was not necessary. - * - * \note Re-allocating a block allocated by a different allocator is undefined. - * - * @param data the allocator's data - * @param mem pointer to the previously allocated block - * @param n the new size in bytes - * @return a pointer to the re-allocated memory + * The allocator's realloc() implementation. */ void *(*realloc)(void *data, void *mem, size_t n) __attribute__((__warn_unused_result__)); /** - * Allocate \p nelem elements of \p n bytes each, all initialized to zero. - * - * @param data the allocator's data - * @param nelem the number of elements - * @param n the size of each element in bytes - * @return a pointer to the allocated memory + * The allocator's calloc() implementation. */ void *(*calloc)(void *data, size_t nelem, size_t n); /** - * Free a block allocated by this allocator. - * - * \note Freeing a block of a different allocator is undefined. - * - * @param data the allocator's data - * @param mem a pointer to the block to free + * The allocator's free() implementation. */ void (*free)(void *data, void *mem) __attribute__((__nonnull__));