Skip to main content

list_copy

Function list_copy 

Source
pub unsafe fn list_copy(
    l: *mut List,
    copier: Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>,
) -> c_int
Expand description

Copy a list with a data copier (upstream list.c xmlListCopy): each node’s data is copied through copier (returns a fresh pointer or NULL on failure). The result replaces the target list l’s content. Returns 0 on success, -1 on error.

§SAFETY

  • l must be a valid list pointer or NULL.
  • copier must be a valid copier function.