749:bbadf84cfc2d | 750:4d7a2238c5ac |
---|---|
68 * The class definition for arbitrary lists. | 68 * The class definition for arbitrary lists. |
69 */ | 69 */ |
70 struct cx_list_class_s { | 70 struct cx_list_class_s { |
71 /** | 71 /** |
72 * Destructor function. | 72 * Destructor function. |
73 * | |
74 * Implementations SHALL invoke the content destructor functions if provided | |
75 * and SHALL deallocate the list memory, if an allocator is provided. | |
73 */ | 76 */ |
74 void (*destructor)(struct cx_list_s *list); | 77 void (*destructor)(struct cx_list_s *list); |
75 | 78 |
76 /** | 79 /** |
77 * Member function for inserting a single elements. | 80 * Member function for inserting a single elements. |
630 * @param list the list which shall be destroyed | 633 * @param list the list which shall be destroyed |
631 */ | 634 */ |
632 __attribute__((__nonnull__)) | 635 __attribute__((__nonnull__)) |
633 void cxListDestroy(CxList *list); | 636 void cxListDestroy(CxList *list); |
634 | 637 |
638 /** | |
639 * A shared instance of an empty list. | |
640 * | |
641 * Writing to that list is undefined. | |
642 */ | |
643 extern CxList * const cxEmptyList; | |
644 | |
645 | |
635 #ifdef __cplusplus | 646 #ifdef __cplusplus |
636 } // extern "C" | 647 } // extern "C" |
637 #endif | 648 #endif |
638 | 649 |
639 #endif // UCX_LIST_H | 650 #endif // UCX_LIST_H |