Skip to main content

new_valid_ctxt

Function new_valid_ctxt 

Source
pub unsafe fn new_valid_ctxt() -> *mut _xmlValidCtxt
Expand description

Create a new validation context.

§UPSTREAM-PARITY

xmlValidCtxtPtr xmlNewValidCtxt(void);

Returns a new zero-initialized validation context, or NULL on OOM.

§SAFETY

The function touches crate-global state only; it is safe as long as the caller respects the library’s global initialization/cleanup ordering (xmlInitParser before use, xmlCleanupParser only after all users are done).

Violating the global lifecycle ordering, or calling this after teardown or from a signal handler, is undefined behavior.