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();
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 */
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,
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 ||
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);
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) { \
/* }}} */
/* {{{ 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;
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 */