ListInitWithDeepCopy

Table of Contents

ListInitWithDeepCopy

Description

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

Parameters

NameDirectionDescription
linPointer to list memory that needs to be initialized.
ciinCopy init method.
cdinCopy deinit method.

Usage example (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

Share :