dl_init()

dl_init()#

Initializes a double-linked list structure by setting its head, tail, and item count to zero.

Prototype

int dl_init(
    dl_list_t *dl,
    hgobj      gobj
);

Parameters

Key

Type

Description

dl

dl_list_t *

Pointer to the double-linked list structure to initialize.

gobj

hgobj

Pointer to the associated gobj, used for tracking purposes.


Return Value

Returns 0 on successful initialization.

Notes

This function ensures that the list is empty before initialization. If the list is not empty, an error message is logged.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples