From f61a06350a03e3c8da7e9b3ba42f50e214b566d8 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Mon, 16 Nov 2009 10:36:27 +0000 Subject: [PATCH] - Switching to TSRMLS_FETCH version --- ext/curl/streams.c | 2 +- ext/standard/ftp_fopen_wrapper.c | 6 +++--- ext/standard/http_fopen_wrapper.c | 2 +- main/streams/php_stream_context.h | 2 +- main/streams/streams.c | 3 ++- main/streams/transports.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 413f5af737..63d43c7623 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -270,7 +270,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, memset(curlstream, 0, sizeof(php_curl_stream)); stream = php_stream_alloc(&php_curl_stream_ops, curlstream, 0, mode); - php_stream_context_set(stream, context TSRMLS_CC); + php_stream_context_set(stream, context); curlstream->curl = curl_easy_init(); curlstream->multi = curl_multi_init(); diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 42e1cd272f..12ae11f3af 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -143,7 +143,7 @@ static php_stream *php_ftp_fopen_connect(php_stream_wrapper *wrapper, char *path goto connect_errexit; } - php_stream_context_set(stream, context TSRMLS_CC); + php_stream_context_set(stream, context); php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0); /* Start talking to ftp server */ @@ -550,7 +550,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, char *path, ch goto errexit; } - php_stream_context_set(datastream, context TSRMLS_CC); + php_stream_context_set(datastream, context); php_stream_notify_progress_init(context, 0, file_size); if (use_ssl_on_data && (php_stream_xport_crypto_setup(datastream, @@ -715,7 +715,7 @@ php_stream * php_stream_ftp_opendir(php_stream_wrapper *wrapper, char *path, cha goto opendir_errexit; } - php_stream_context_set(datastream, context TSRMLS_CC); + php_stream_context_set(datastream, context); if (use_ssl_on_data && (php_stream_xport_crypto_setup(stream, STREAM_CRYPTO_METHOD_SSLv23_CLIENT, NULL TSRMLS_CC) < 0 || diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index fe90fbc6c3..0e598909fa 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -245,7 +245,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, eol_detect = stream->flags & (PHP_STREAM_FLAG_DETECT_EOL | PHP_STREAM_FLAG_EOL_MAC); stream->flags &= ~(PHP_STREAM_FLAG_DETECT_EOL | PHP_STREAM_FLAG_EOL_MAC); - php_stream_context_set(stream, context TSRMLS_CC); + php_stream_context_set(stream, context); php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0); diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h index f1bd70986a..cfe3b56d9b 100644 --- a/main/streams/php_stream_context.h +++ b/main/streams/php_stream_context.h @@ -95,7 +95,7 @@ END_EXTERN_C() BEGIN_EXTERN_C() PHPAPI void php_stream_notification_notify(php_stream_context *context, int notifycode, int severity, char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC); -PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC); +PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context); END_EXTERN_C() #define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) { \ diff --git a/main/streams/streams.c b/main/streams/streams.c index fbfc1af5ee..0df65b3bec 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1958,9 +1958,10 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio /* }}} */ /* {{{ context API */ -PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC) +PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context) { php_stream_context *oldcontext = stream->context; + TSRMLS_FETCH(); stream->context = context; diff --git a/main/streams/transports.c b/main/streams/transports.c index 9a08ae4e5a..a52ee486bc 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -134,7 +134,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, long namelen, int context STREAMS_REL_CC TSRMLS_CC); if (stream) { - php_stream_context_set(stream, context TSRMLS_CC); + php_stream_context_set(stream, context); if ((flags & STREAM_XPORT_SERVER) == 0) { /* client */ -- 2.50.1