bool f_libxml_use_internal_errors(CVarRef use_errors /* = null_variant */) {
  bool ret = (xmlStructuredError == libxml_error_handler);
  if (!use_errors.isNull()) {
    if (!use_errors.toBoolean()) {
      xmlSetStructuredErrorFunc(nullptr, nullptr);
      s_libxml_errors->m_use_error = false;
      s_libxml_errors->m_errors.reset();
    } else {
      xmlSetStructuredErrorFunc(nullptr, libxml_error_handler);
      s_libxml_errors->m_use_error = true;
    }
  }
  return ret;
}
bool f_libxml_use_internal_errors(CVarRef use_errors  ) {
  bool ret = (xmlStructuredError == libxml_error_handler);
  if (!use_errors.isNull()) {
    if (!use_errors.toBoolean()) {
      xmlSetStructuredErrorFunc(nullptr, nullptr);
      s_libxml_errors->m_use_error = false;
      s_libxml_errors->m_errors.reset();
    } else {
      xmlSetStructuredErrorFunc(nullptr, libxml_error_handler);
      s_libxml_errors->m_use_error = true;
    }
  }
  return ret;
}