Function pkgcraft::dep::pkgcraft_dependency_set_replace

source ·
#[no_mangle]
pub unsafe extern "C" fn pkgcraft_dependency_set_replace(
    d: *mut DependencySet,
    key: *const Dependency,
    value: *mut Dependency,
) -> *mut Dependency
Expand description

Replace a Dependency with another Dependency in a DependencySet, returning the replaced value.

Returns NULL on nonexistence or if the DependencySet already contains the given Dependency.

§Safety

The arguments must be valid DependencySet and Dependency pointers.