MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / liq_set_log_callback

Function liq_set_log_callback

imagequant-sys/src/ffi.rs:203–210  ·  view source on GitHub ↗
(attr: &mut liq_attr, callback: liq_log_callback_function, user_info: AnySyncSendPtr)

Source from the content-addressed store, hash-verified

201#[no_mangle]
202#[inline(never)]
203pub unsafe extern "C" fn liq_set_log_callback(attr: &mut liq_attr, callback: liq_log_callback_function, user_info: AnySyncSendPtr) {
204 if bad_object!(attr, LIQ_ATTR_MAGIC) { return; }
205 attr.inner.set_log_callback(move |attr, msg| {
206 if let Ok(tmp) = CString::new(msg) {
207 callback(attr_to_liq_attr_ptr(attr), tmp.as_ptr(), user_info);
208 }
209 });
210}
211
212#[no_mangle]
213#[inline(never)]

Callers 1

test_fixed_colorsFunction · 0.85

Calls 3

newFunction · 0.85
attr_to_liq_attr_ptrFunction · 0.85
set_log_callbackMethod · 0.80

Tested by 1

test_fixed_colorsFunction · 0.68