diff options
Diffstat (limited to 'ext/libxml/libxml.c')
-rw-r--r-- | ext/libxml/libxml.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 25f5ac08b9..d9e92541e9 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -302,6 +302,8 @@ static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char int isescaped=0; xmlURI *uri; + TSRMLS_FETCH(); + uri = xmlParseURI(filename); if (uri && (uri->scheme == NULL || (xmlStrncmp(BAD_CAST uri->scheme, BAD_CAST "file", 4) == 0))) { @@ -356,16 +358,19 @@ static void *php_libxml_streams_IO_open_write_wrapper(const char *filename) static int php_libxml_streams_IO_read(void *context, char *buffer, int len) { + TSRMLS_FETCH(); return php_stream_read((php_stream*)context, buffer, len); } static int php_libxml_streams_IO_write(void *context, const char *buffer, int len) { + TSRMLS_FETCH(); return php_stream_write((php_stream*)context, buffer, len); } static int php_libxml_streams_IO_close(void *context) { + TSRMLS_FETCH(); return php_stream_close((php_stream*)context); } @@ -374,6 +379,7 @@ php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; void *context = NULL; + TSRMLS_FETCH(); if (LIBXML(entity_loader_disabled)) { return NULL; @@ -457,6 +463,8 @@ static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg) xmlError error_copy; int ret; + TSRMLS_FETCH(); + memset(&error_copy, 0, sizeof(xmlError)); if (error) { @@ -512,6 +520,8 @@ static void php_libxml_internal_error_handler(int error_type, void *ctx, const c char *buf; int len, len_iter, output = 0; + TSRMLS_FETCH(); + len = vspprintf(&buf, 0, *msg, ap); len_iter = len; @@ -553,6 +563,7 @@ static xmlParserInputPtr _php_libxml_external_entity_loader(const char *URL, zval params[3]; int status; zend_fcall_info *fci; + TSRMLS_FETCH(); fci = &LIBXML(entity_loader).fci; @@ -669,6 +680,8 @@ is_string: static xmlParserInputPtr _php_libxml_pre_ext_ent_loader(const char *URL, const char *ID, xmlParserCtxtPtr context) { + TSRMLS_FETCH(); + /* Check whether we're running in a PHP context, since the entity loader * we've defined is an application level (true global) setting. * If we are, we also want to check whether we've finished activating @@ -876,6 +889,7 @@ static PHP_MSHUTDOWN_FUNCTION(libxml) static int php_libxml_post_deactivate(void) { + TSRMLS_FETCH(); /* reset libxml generic error handling */ if (_php_libxml_per_request_initialization) { xmlSetGenericErrorFunc(NULL, NULL); |