diff options
author | Pierre Joye <pajoye@php.net> | 2010-09-16 09:33:42 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-09-16 09:33:42 +0000 |
commit | ed58636f004aa9240a8f9cd056bdd0dc7c05490c (patch) | |
tree | b04a57c17f1508a1fd2107a0e143ea9ccaefc075 | |
parent | daa90813fb4cee6bb50af334c14f17d795ab8d3b (diff) | |
download | php-git-ed58636f004aa9240a8f9cd056bdd0dc7c05490c.tar.gz |
- use TSRMLS_D/C with php_stream_context_alloc
-rw-r--r-- | UPGRADING.INTERNALS | 9 | ||||
-rw-r--r-- | ext/mysqlnd/mysqlnd_net.c | 2 | ||||
-rw-r--r-- | ext/soap/php_sdl.c | 6 | ||||
-rw-r--r-- | ext/soap/soap.c | 2 | ||||
-rw-r--r-- | ext/standard/streamsfuncs.c | 8 | ||||
-rw-r--r-- | ext/standard/url.c | 2 | ||||
-rw-r--r-- | main/streams/php_stream_context.h | 2 |
7 files changed, 20 insertions, 11 deletions
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 08e3085194..33b93a7a32 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -86,3 +86,12 @@ PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D) it has to be called using: context = php_stream_context_alloc(TSRMLS_C); + + h. php_stream_context_alloc +php_stream_context_alloc uses now TSRMLS_D: + +PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D); + +it has to be called using: + +context = php_stream_context_alloc(TSRMLS_C); diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 7a65fa1420..3d25362f82 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -731,7 +731,7 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC) { #ifdef MYSQLND_SSL_SUPPORTED - php_stream_context *context = php_stream_context_alloc(); + php_stream_context *context = php_stream_context_alloc(TSRMLS_C); DBG_ENTER("mysqlnd_net::enable_ssl"); if (!context) { DBG_RETURN(FAIL); diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 93ea595195..9d7661aee0 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -3222,7 +3222,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) "_stream_context", sizeof("_stream_context"), (void**)&tmp)) { context = php_stream_context_from_zval(*tmp, 0); } else { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_host", sizeof("_proxy_host"), (void **) &proxy_host) == SUCCESS && @@ -3245,7 +3245,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) smart_str_free(&proxy); if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } php_stream_context_set_option(context, "http", "proxy", str_proxy); zval_ptr_dtor(&str_proxy); @@ -3274,7 +3274,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) zval *str_headers; if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } smart_str_0(&headers); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index f447896d96..8189e63c54 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2524,7 +2524,7 @@ PHP_METHOD(SoapClient, SoapClient) if (zend_hash_find(ht, "local_cert", sizeof("local_cert"), (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING) { if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } php_stream_context_set_option(context, "ssl", "local_cert", *tmp); if (zend_hash_find(ht, "passphrase", sizeof("passphrase"), (void**)&tmp) == SUCCESS && diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index e88bdf751a..7547cd4057 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -966,7 +966,7 @@ static php_stream_context *decode_context_param(zval *contextresource TSRMLS_DC) param, but then something is called which requires a context. Don't give them the default one though since they already said they didn't want it. */ - context = stream->context = php_stream_context_alloc(); + context = stream->context = php_stream_context_alloc(TSRMLS_C); } } } @@ -1092,7 +1092,7 @@ PHP_FUNCTION(stream_context_get_default) } if (FG(default_context) == NULL) { - FG(default_context) = php_stream_context_alloc(); + FG(default_context) = php_stream_context_alloc(TSRMLS_C); } context = FG(default_context); @@ -1116,7 +1116,7 @@ PHP_FUNCTION(stream_context_set_default) } if (FG(default_context) == NULL) { - FG(default_context) = php_stream_context_alloc(); + FG(default_context) = php_stream_context_alloc(TSRMLS_C); } context = FG(default_context); @@ -1137,7 +1137,7 @@ PHP_FUNCTION(stream_context_create) RETURN_FALSE; } - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); if (options) { parse_context_options(context, options TSRMLS_CC); diff --git a/ext/standard/url.c b/ext/standard/url.c index b6e01d5513..dd99cb5301 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -680,7 +680,7 @@ PHP_FUNCTION(get_headers) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &url, &url_len, &format) == FAILURE) { return; } - context = FG(default_context) ? FG(default_context) : (FG(default_context) = php_stream_context_alloc()); + context = FG(default_context) ? FG(default_context) : (FG(default_context) = php_stream_context_alloc(TSRMLS_C)); if (!(stream = php_stream_open_wrapper_ex(url, "r", REPORT_ERRORS | STREAM_USE_URL | STREAM_ONLY_GET_HEADERS, NULL, context))) { RETURN_FALSE; diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h index 10c91af68b..48175ad7be 100644 --- a/main/streams/php_stream_context.h +++ b/main/streams/php_stream_context.h @@ -36,7 +36,7 @@ typedef void (*php_stream_notification_func)(php_stream_context *context, (zcontext) ? zend_fetch_resource(&(zcontext) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context(TSRMLS_C)) : \ (nocontext) ? NULL : \ FG(default_context) ? FG(default_context) : \ - (FG(default_context) = php_stream_context_alloc()) ) + (FG(default_context) = php_stream_context_alloc(TSRMLS_C)) ) #define php_stream_context_to_zval(context, zval) { ZVAL_RESOURCE(zval, (context)->rsrc_id); zend_list_addref((context)->rsrc_id); } |