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;
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;
PHP_RINIT_FUNCTION(libxml)
{
+ /* report errors via handler rather than stderr */
+ xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
+
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(libxml)
{
+ /* reset libxml generic error handling */
+ xmlSetGenericErrorFunc(NULL, NULL);
+
smart_str_free(&LIBXML(error_buffer));
return SUCCESS;
}