rrichards Fri Apr 23 13:31:45 2004 EDT
Modified files:
/php-src/ext/libxml libxml.c
Log:
move libxml error handler ro rinit/rshutdown to keep it local to php
http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.16&r2=1.17&ty=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.16 php-src/ext/libxml/libxml.c:1.17
--- php-src/ext/libxml/libxml.c:1.16 Mon Mar 1 07:09:22 2004
+++ php-src/ext/libxml/libxml.c Fri Apr 23 13:31:44 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: libxml.c,v 1.16 2004/03/01 12:09:22 rrichards Exp $ */
+/* $Id: libxml.c,v 1.17 2004/04/23 17:31:44 rrichards Exp $ */
#define IS_EXT_MODULE
@@ -400,9 +400,6 @@
php_libxml_streams_IO_write,
php_libxml_streams_IO_close);
- /* report errors via handler rather than stderr */
- xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
-
zend_hash_init(&php_libxml_exports, 0, NULL, NULL, 1);
_php_libxml_initialized = 1;
@@ -411,8 +408,6 @@
PHP_LIBXML_API void php_libxml_shutdown() {
if (_php_libxml_initialized) {
- /* reset libxml generic error handling */
- xmlSetGenericErrorFunc(NULL, NULL);
xmlCleanupParser();
zend_hash_destroy(&php_libxml_exports);
_php_libxml_initialized = 0;
@@ -436,6 +431,9 @@
PHP_RINIT_FUNCTION(libxml)
{
+ /* report errors via handler rather than stderr */
+ xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
+
return SUCCESS;
}
@@ -450,6 +448,9 @@
PHP_RSHUTDOWN_FUNCTION(libxml)
{
+ /* reset libxml generic error handling */
+ xmlSetGenericErrorFunc(NULL, NULL);
+
smart_str_free(&LIBXML(error_buffer));
return SUCCESS;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php