Skip to content
ListInitWithDeepCopy

ListInitWithDeepCopy

ListInitWithDeepCopy

Description

Initialize a list with copy init and deinit methods for maintaining a deep-copy.

Parameters

Name Direction Description
l in Pointer to list memory that needs to be initialized.
ci in Copy init method.
cd in Copy deinit method.

Usage example (Cross-references)

Usage examples (Cross-references)
    /// Initialize a list with default arguments.
    ///
    #define ListInit() ListInitWithDeepCopy(NULL, NULL)
    
    ///
    
    #ifdef __cplusplus
    #    define ListInitWithDeepCopyT(l, ci, cd) (TYPE_OF(l) ListInitWithDeepCopy(ci, cd))
    #else
    ///
    /// cd[in] : Copy deinit method (for deiniting copied objects)
    ///
    #    define ListInitWithDeepCopyT(l, ci, cd) ((TYPE_OF(l))ListInitWithDeepCopy(ci, cd))
    #endif
Last updated on