pajoye Thu, 16 Sep 2010 09:33:42 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303416
Log: - use TSRMLS_D/C with php_stream_context_alloc Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS U php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c U php/php-src/trunk/ext/soap/php_sdl.c U php/php-src/trunk/ext/soap/soap.c U php/php-src/trunk/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/standard/url.c U php/php-src/trunk/main/streams/php_stream_context.h Modified: php/php-src/trunk/UPGRADING.INTERNALS =================================================================== --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-16 09:33:42 UTC (rev 303416) @@ -86,3 +86,12 @@ 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); Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -731,7 +731,7 @@ 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); Modified: php/php-src/trunk/ext/soap/php_sdl.c =================================================================== --- php/php-src/trunk/ext/soap/php_sdl.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/soap/php_sdl.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -3222,7 +3222,7 @@ "_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 @@ 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 @@ zval *str_headers; if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } smart_str_0(&headers); Modified: php/php-src/trunk/ext/soap/soap.c =================================================================== --- php/php-src/trunk/ext/soap/soap.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/soap/soap.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -2524,7 +2524,7 @@ 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 && Modified: php/php-src/trunk/ext/standard/streamsfuncs.c =================================================================== --- php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -966,7 +966,7 @@ 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 @@ } 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 @@ } 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 @@ RETURN_FALSE; } - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); if (options) { parse_context_options(context, options TSRMLS_CC); Modified: php/php-src/trunk/ext/standard/url.c =================================================================== --- php/php-src/trunk/ext/standard/url.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/standard/url.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -680,7 +680,7 @@ 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; Modified: php/php-src/trunk/main/streams/php_stream_context.h =================================================================== --- php/php-src/trunk/main/streams/php_stream_context.h 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/main/streams/php_stream_context.h 2010-09-16 09:33:42 UTC (rev 303416) @@ -36,7 +36,7 @@ (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); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php