ucx/cx/list.h

changeset 750
4d7a2238c5ac
parent 748
49a284f61e8c
child 776
96555c0ed875
--- a/ucx/cx/list.h	Sun May 21 11:52:06 2023 +0200
+++ b/ucx/cx/list.h	Sun May 21 16:34:58 2023 +0200
@@ -70,6 +70,9 @@
 struct cx_list_class_s {
     /**
      * Destructor function.
+     *
+     * Implementations SHALL invoke the content destructor functions if provided
+     * and SHALL deallocate the list memory, if an allocator is provided.
      */
     void (*destructor)(struct cx_list_s *list);
 
@@ -632,6 +635,14 @@
 __attribute__((__nonnull__))
 void cxListDestroy(CxList *list);
 
+/**
+ * A shared instance of an empty list.
+ *
+ * Writing to that list is undefined.
+ */
+extern CxList * const cxEmptyList;
+
+
 #ifdef __cplusplus
 } // extern "C"
 #endif

mercurial