cairo_native_runtime

Function cairo_native__dict_dup

Source
#[no_mangle]
pub unsafe extern "C" fn cairo_native__dict_dup(
    old_dict: &FeltDict,
    dup_fn: Option<extern "C" fn(_: *mut c_void, _: *mut c_void)>,
) -> *mut FeltDict
Expand description

Duplicate a dictionary using a provided callback to clone each element.

The dup_fn callback is present when the value is not Copy, but Clone. The first argument is the original value while the second is the target pointer.

ยงSafety

This function is intended to be called from MLIR, deals with pointers, and is therefore definitely unsafe to use manually.