#[unsafe(no_mangle)]pub unsafe extern "C" fn xsltSetGenericDebugFunc(
ctx: *mut c_void,
handler: Option<unsafe extern "C" fn(*mut c_void, *const c_char)>,
)Expand description
Global debug handler: the exported xsltGenericDebug data global in
crate::abi::data_globals (upstream xsltGenericDebug, a function
pointer variable defaulting to xsltGenericDebugDefaultFunc — R-000174).
Set the generic debug handler (upstream xsltSetGenericDebugFunc).
§UPSTREAM-PARITY
void xsltSetGenericDebugFunc(void *ctx, xmlGenericErrorFunc handler);Upstream (xsltutils.c:650): xsltGenericDebugContext = ctx; and — only
when handler != NULL — xsltGenericDebug = handler;. With a NULL
context the default handler suppresses output; a NULL handler leaves the
current handler installed.
§SAFETY
-
ctxmust be valid pointers (or NULL where the upstream C contract allows), obtained from the matching constructor/owner and not yet freed; the callee may take or keep ownership exactly as the C API specifies. -
handlermust be a valid callback (or None); the callback is invoked with the documented context pointer and must itself uphold the same pointer invariants.
The caller must not race this call with concurrent mutation of the same objects from other threads (per-object state is not internally synchronized). Violating any of the above is undefined behavior.
Exercised by the C-API differential courts (courts/suites/data-abi/*-family-probe.c) and the CLI differential courts; those pass byte-for-byte against the upstream oracle.