File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ Init_nokogiri(void)
192
192
mNokogiriXmlXpath = rb_define_module_under (mNokogiriXml , "XPath" );
193
193
mNokogiriXslt = rb_define_module_under (mNokogiri , "XSLT" );
194
194
195
+ set_libxml_memory_management (); /* must be before any function calls that might invoke xmlInitParser() */
196
+ xmlInitParser ();
197
+ exsltRegisterAll ();
198
+
195
199
rb_const_set (mNokogiri , rb_intern ("LIBXML_COMPILED_VERSION" ), NOKOGIRI_STR_NEW2 (LIBXML_DOTTED_VERSION ));
196
200
rb_const_set (mNokogiri , rb_intern ("LIBXML_LOADED_VERSION" ), NOKOGIRI_STR_NEW2 (xmlParserVersion ));
197
201
@@ -224,11 +228,6 @@ Init_nokogiri(void)
224
228
rb_const_set (mNokogiri , rb_intern ("OTHER_LIBRARY_VERSIONS" ), NOKOGIRI_STR_NEW2 (NOKOGIRI_OTHER_LIBRARY_VERSIONS ));
225
229
#endif
226
230
227
- set_libxml_memory_management ();
228
-
229
- xmlInitParser ();
230
- exsltRegisterAll ();
231
-
232
231
if (xsltExtModuleFunctionLookup ((const xmlChar * )"date-time" , EXSLT_DATE_NAMESPACE )) {
233
232
rb_const_set (mNokogiri , rb_intern ("LIBXSLT_DATETIME_ENABLED" ), Qtrue );
234
233
} else {
You can’t perform that action at this time.
0 commit comments