ext/xml/libxml.c in libxml-ruby-0.3.8.4 vs ext/xml/libxml.c in libxml-ruby-0.5.0

- old
+ new

@@ -1,6 +1,6 @@ -/* $Id: libxml.c,v 1.3.2.1 2006/11/26 12:37:41 roscopeco Exp $ */ +/* $Id: libxml.c 138 2007-08-29 18:00:35Z danj $ */ /* Please see the LICENSE file for copyright and distribution information */ #include "libxml.h" @@ -47,29 +47,30 @@ static xmlStrdupFunc strdupFunc = NULL; void Init_libxml_so(void) { /* Some libxml memory goo that should be done before anything else */ +#ifdef NONE xmlMemGet((xmlFreeFunc *) & freeFunc, (xmlMallocFunc *) & mallocFunc, (xmlReallocFunc *) & reallocFunc, (xmlStrdupFunc *) & strdupFunc); if (xmlMemSetup((xmlFreeFunc)RubyMemFree, (xmlMallocFunc)RubyMemMalloc, (xmlReallocFunc)RubyMemRealloc, (xmlStrdupFunc)RubyMemStrdup) != 0) rb_fatal("could not install the memory handlers for libxml"); +#endif xmlInitParser(); mXML = rb_define_module("XML"); eXMLError = rb_define_class_under(mXML, "Error", rb_eRuntimeError); rb_define_const(mXML, "XML_NAMESPACE", rb_str_new2((const char*)XML_XML_NAMESPACE)); ruby_init_parser(); ruby_init_xml_parser_context(); ruby_init_xml_attr(); - ruby_init_xml_attribute(); ruby_init_xml_document(); ruby_init_xml_node(); ruby_init_xml_node_set(); ruby_init_xml_ns(); ruby_init_xml_sax_parser(); @@ -77,12 +78,14 @@ ruby_init_xml_xinclude(); ruby_init_xml_xpath(); ruby_init_xml_xpath_context(); ruby_init_xml_xpointer(); ruby_init_xml_xpointer_context(); + ruby_init_html_parser(); ruby_init_input_callbacks(); ruby_init_xml_dtd(); ruby_init_xml_schema(); + ruby_init_xml_reader(); ruby_xml_parser_default_substitute_entities_set(cXMLParser, Qtrue); ruby_xml_parser_default_load_external_dtd_set(cXMLParser, Qtrue); }