Skip to content

Commit f61a063

Browse files
committed
- Switching to TSRMLS_FETCH version
1 parent 5411bb3 commit f61a063

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

ext/curl/streams.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
270270
memset(curlstream, 0, sizeof(php_curl_stream));
271271

272272
stream = php_stream_alloc(&php_curl_stream_ops, curlstream, 0, mode);
273-
php_stream_context_set(stream, context TSRMLS_CC);
273+
php_stream_context_set(stream, context);
274274

275275
curlstream->curl = curl_easy_init();
276276
curlstream->multi = curl_multi_init();

ext/standard/ftp_fopen_wrapper.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static php_stream *php_ftp_fopen_connect(php_stream_wrapper *wrapper, char *path
143143
goto connect_errexit;
144144
}
145145

146-
php_stream_context_set(stream, context TSRMLS_CC);
146+
php_stream_context_set(stream, context);
147147
php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);
148148

149149
/* Start talking to ftp server */
@@ -550,7 +550,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, char *path, ch
550550
goto errexit;
551551
}
552552

553-
php_stream_context_set(datastream, context TSRMLS_CC);
553+
php_stream_context_set(datastream, context);
554554
php_stream_notify_progress_init(context, 0, file_size);
555555

556556
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
715715
goto opendir_errexit;
716716
}
717717

718-
php_stream_context_set(datastream, context TSRMLS_CC);
718+
php_stream_context_set(datastream, context);
719719

720720
if (use_ssl_on_data && (php_stream_xport_crypto_setup(stream,
721721
STREAM_CRYPTO_METHOD_SSLv23_CLIENT, NULL TSRMLS_CC) < 0 ||

ext/standard/http_fopen_wrapper.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
245245
eol_detect = stream->flags & (PHP_STREAM_FLAG_DETECT_EOL | PHP_STREAM_FLAG_EOL_MAC);
246246
stream->flags &= ~(PHP_STREAM_FLAG_DETECT_EOL | PHP_STREAM_FLAG_EOL_MAC);
247247

248-
php_stream_context_set(stream, context TSRMLS_CC);
248+
php_stream_context_set(stream, context);
249249

250250
php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);
251251

main/streams/php_stream_context.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ END_EXTERN_C()
9595
BEGIN_EXTERN_C()
9696
PHPAPI void php_stream_notification_notify(php_stream_context *context, int notifycode, int severity,
9797
char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC);
98-
PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC);
98+
PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context);
9999
END_EXTERN_C()
100100

101101
#define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) { \

main/streams/streams.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1958,9 +1958,10 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio
19581958
/* }}} */
19591959

19601960
/* {{{ context API */
1961-
PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC)
1961+
PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context)
19621962
{
19631963
php_stream_context *oldcontext = stream->context;
1964+
TSRMLS_FETCH();
19641965

19651966
stream->context = context;
19661967

main/streams/transports.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, long namelen, int
134134
context STREAMS_REL_CC TSRMLS_CC);
135135

136136
if (stream) {
137-
php_stream_context_set(stream, context TSRMLS_CC);
137+
php_stream_context_set(stream, context);
138138

139139
if ((flags & STREAM_XPORT_SERVER) == 0) {
140140
/* client */

0 commit comments

Comments
 (0)