Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always call LibXML.xmlInitParser when requiring XML libraries #14191

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/xml/libxml2.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ require "./save_options"
lib LibXML
alias Int = LibC::Int

fun xmlInitParser

# TODO: check if other platforms also support per-thread globals
{% if flag?(:win32) %}
fun xmlInitParser
fun __xmlIndentTreeOutput : Int*
fun __xmlTreeIndentString : UInt8**
{% else %}
Expand Down Expand Up @@ -324,9 +325,7 @@ lib LibXML
fun xmlValidateNameValue(value : UInt8*) : Int
end

{% if flag?(:win32) %}
LibXML.xmlInitParser
{% end %}
LibXML.xmlInitParser

LibXML.xmlGcMemSetup(
->GC.free,
Expand Down