diff options
| author | Shane Caraveo <shane@php.net> | 2003-10-19 23:17:56 +0000 |
|---|---|---|
| committer | Shane Caraveo <shane@php.net> | 2003-10-19 23:17:56 +0000 |
| commit | 052f9378b2cc5a3fffc3c7caad7a1df8a48ecd15 (patch) | |
| tree | bfcecebe5fdb99d7d9acd95b8f0cafc0bae9965b /ext/dom/php_dom.c | |
| parent | 399095e7a5c3cc6a288c137b290db04bc9ed17b8 (diff) | |
| download | php-git-052f9378b2cc5a3fffc3c7caad7a1df8a48ecd15.tar.gz | |
add global init/shutdown functions for libxml. this is required as
shutdown is not safe to call multiple times, and to make streams work
correctly some init stuff has to happen in a specific order
Diffstat (limited to 'ext/dom/php_dom.c')
| -rw-r--r-- | ext/dom/php_dom.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index b1149d8b86..eb39de3bb2 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -32,6 +32,7 @@ #include "dom_properties.h" #include "ext/standard/info.h" +#include "ext/libxml/php_libxml.h" #define PHP_XPATH 1 #define PHP_XPTR 2 @@ -702,7 +703,7 @@ PHP_MINIT_FUNCTION(dom) REGISTER_LONG_CONSTANT("DOM_INVALID_ACCESS_ERR", INVALID_ACCESS_ERR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("DOM_VALIDATION_ERR", VALIDATION_ERR, CONST_CS | CONST_PERSISTENT); - xmlInitParser(); + php_libxml_initialize(); return SUCCESS; } @@ -724,13 +725,17 @@ PHP_MINFO_FUNCTION(dom) #if defined(LIBXML_XPTR_ENABLED) php_info_print_table_row(2, "XPointer Support", "enabled"); #endif +#ifdef LIBXML_SCHEMAS_ENABLED + php_info_print_table_row(2, "Schema Support", "enabled"); + php_info_print_table_row(2, "RelaxNG Support", "enabled"); +#endif php_info_print_table_end(); } /* }}} */ PHP_MSHUTDOWN_FUNCTION(dom) { - xmlCleanupParser(); + php_libxml_shutdown(); zend_hash_destroy(&dom_domstringlist_prop_handlers); zend_hash_destroy(&dom_namelist_prop_handlers); |
