From: Moriyoshi Koizumi Date: Tue, 4 Nov 2003 16:15:52 +0000 (+0000) Subject: Add XML_SAX_IMPL constant to determine which implementation (libxml / expat) X-Git-Tag: php-5.0.0b3RC1~772 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0725828f055d41a30515725ceb283a5c2e1b893;p=php Add XML_SAX_IMPL constant to determine which implementation (libxml / expat) is selected for SAX interface. --- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 4d644cacc0..83f377140a 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -240,6 +240,12 @@ PHP_MINIT_FUNCTION(xml) php_xml_mem_hdlrs.realloc_fcn = php_xml_realloc_wrapper; php_xml_mem_hdlrs.free_fcn = php_xml_free_wrapper; +#ifdef LIBXML_EXPAT_COMPAT + REGISTER_STRING_CONSTANT("XML_SAX_IMPL", "libxml", CONST_CS|CONST_PERSISTENT); +#else + REGISTER_STRING_CONSTANT("XML_SAX_IMPL", "expat", CONST_CS|CONST_PERSISTENT); +#endif + #ifdef LIBXML_EXPAT_COMPAT php_libxml_initialize(); #endif @@ -273,7 +279,7 @@ PHP_MINFO_FUNCTION(xml) php_info_print_table_start(); php_info_print_table_row(2, "XML Support", "active"); php_info_print_table_row(2, "XML Namespace Support", "active"); -#ifdef LIBXML_DOTTED_VERSION +#if defined(LIBXML_DOTTED_VERSION) && defined(LIBXML_EXPAT_COMPAT) php_info_print_table_row(2, "libxml2 Version", LIBXML_DOTTED_VERSION); #else php_info_print_table_row(2, "EXPAT Version", XML_ExpatVersion());