src/cx/list.h

changeset 666
b5dd654deb3b
parent 664
af5bf4603a5d
child 667
2f88a7c13a28
     1.1 --- a/src/cx/list.h	Mon Mar 20 18:05:12 2023 +0100
     1.2 +++ b/src/cx/list.h	Mon Mar 20 19:09:08 2023 +0100
     1.3 @@ -227,7 +227,7 @@
     1.4  typedef struct cx_list_s CxList;
     1.5  
     1.6  /**
     1.7 - * Invokes the destructor function for a specific element.
     1.8 + * Invokes the configured destructor function for a specific element.
     1.9   *
    1.10   * Usually only used by list implementations. There should be no need
    1.11   * to invoke this function manually.
    1.12 @@ -242,6 +242,36 @@
    1.13  );
    1.14  
    1.15  /**
    1.16 + * Invokes the simple destructor function for a specific element.
    1.17 + *
    1.18 + * Usually only used by list implementations. There should be no need
    1.19 + * to invoke this function manually.
    1.20 + *
    1.21 + * @param list the list
    1.22 + * @param elem the element
    1.23 + */
    1.24 +__attribute__((__nonnull__))
    1.25 +void cx_list_invoke_simple_destructor(
    1.26 +        struct cx_list_s const *list,
    1.27 +        void *elem
    1.28 +);
    1.29 +
    1.30 +/**
    1.31 + * Invokes the advanced destructor function for a specific element.
    1.32 + *
    1.33 + * Usually only used by list implementations. There should be no need
    1.34 + * to invoke this function manually.
    1.35 + *
    1.36 + * @param list the list
    1.37 + * @param elem the element
    1.38 + */
    1.39 +__attribute__((__nonnull__))
    1.40 +void cx_list_invoke_advanced_destructor(
    1.41 +        struct cx_list_s const *list,
    1.42 +        void *elem
    1.43 +);
    1.44 +
    1.45 +/**
    1.46   * Advises the list to store copies of the objects (default mode of operation).
    1.47   *
    1.48   * Retrieving objects from this list will yield pointers to the copies stored
    1.49 @@ -276,7 +306,7 @@
    1.50   * @see cxListStorePointers()
    1.51   */
    1.52  __attribute__((__nonnull__))
    1.53 -bool cxListIsStoringPointers(CxList *list);
    1.54 +bool cxListIsStoringPointers(CxList const *list);
    1.55  
    1.56  /**
    1.57   * Adds an item to the end of the list.

mercurial