Skip to main content

xmlCheckVersion

Function xmlCheckVersion 

Source
#[unsafe(no_mangle)]
pub const unsafe extern "C" fn xmlCheckVersion( version: c_int, ) -> c_int
Expand description

Check that the library version is at least version.

§Returns

  • 0 if the library version is >= version
  • -1 if the library version is < version

§UPSTREAM-PARITY

int xmlCheckVersion(int version);

Oracle behavior: compares LIBXML2_VERSION (compiled-in) against version. Returns 0 if compatible, -1 if not.

§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.