remove redundant documentation for function pointers

Tue, 05 Oct 2021 12:25:23 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 05 Oct 2021 12:25:23 +0200
changeset 465
1e3cb39815f8
parent 464
7fafc95968fc
child 466
28bc3e10ac28

remove redundant documentation for function pointers

src/cx/allocator.h file | annotate | diff | comparison | revisions
     1.1 --- a/src/cx/allocator.h	Tue Oct 05 12:23:46 2021 +0200
     1.2 +++ b/src/cx/allocator.h	Tue Oct 05 12:25:23 2021 +0200
     1.3 @@ -44,46 +44,23 @@
     1.4   */
     1.5  typedef struct {
     1.6      /**
     1.7 -     * Allocate \p n bytes of memory.
     1.8 -     *
     1.9 -     * @param data the allocator's data
    1.10 -     * @param n the number of bytes
    1.11 -     * @return a pointer to the allocated memory
    1.12 +     * The allocator's malloc() implementation.
    1.13       */
    1.14      void *(*malloc)(void *data, size_t n);
    1.15  
    1.16      /**
    1.17 -     * Re-allocate the previously allocated block in \p mem, making the new block \p n bytes long.
    1.18 -     * This function may return the same pointer that was passed to it, if moving the memory
    1.19 -     * was not necessary.
    1.20 -     *
    1.21 -     * \note Re-allocating a block allocated by a different allocator is undefined.
    1.22 -     *
    1.23 -     * @param data the allocator's data
    1.24 -     * @param mem pointer to the previously allocated block
    1.25 -     * @param n the new size in bytes
    1.26 -     * @return a pointer to the re-allocated memory
    1.27 +     * The allocator's realloc() implementation.
    1.28       */
    1.29      void *(*realloc)(void *data, void *mem, size_t n)
    1.30      __attribute__((__warn_unused_result__));
    1.31  
    1.32      /**
    1.33 -     * Allocate \p nelem elements of \p n bytes each, all initialized to zero.
    1.34 -     *
    1.35 -     * @param data the allocator's data
    1.36 -     * @param nelem the number of elements
    1.37 -     * @param n the size of each element in bytes
    1.38 -     * @return a pointer to the allocated memory
    1.39 +     * The allocator's calloc() implementation.
    1.40       */
    1.41      void *(*calloc)(void *data, size_t nelem, size_t n);
    1.42  
    1.43      /**
    1.44 -     * Free a block allocated by this allocator.
    1.45 -     *
    1.46 -     * \note Freeing a block of a different allocator is undefined.
    1.47 -     *
    1.48 -     * @param data the allocator's data
    1.49 -     * @param mem a pointer to the block to free
    1.50 +     * The allocator's free() implementation.
    1.51       */
    1.52      void (*free)(void *data, void *mem)
    1.53      __attribute__((__nonnull__));

mercurial