# HG changeset patch # User Mike Becker # Date 1633429523 -7200 # Node ID 1e3cb39815f8beadc7b3184b8c9cc74a274bf672 # Parent 7fafc95968fc4d7a2530cefce1c55c2cb349f6c7 remove redundant documentation for function pointers diff -r 7fafc95968fc -r 1e3cb39815f8 src/cx/allocator.h --- 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__));