com php-src: remove the thread ctx from curl: ext/curl/interface.c ext/curl/php_curl.h
| From: | Anatol Belski | Date: | Wed, 17 Dec 2014 10:38:46 +0000 |
| Subject: | com php-src: remove the thread ctx from curl: ext/curl/interface.c ext/curl/php_curl.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83779@lists.php.net to get a copy of this message | ||
Commit: 3b6a8b1163a6705e9cb07125ea6328eaa656b740
Author: Anatol Belski <ab@php.net> Wed, 17 Dec 2014 11:38:46 +0100
Parents: 386cb177bdc9d021b42febcc083ddaf9a4af3007
Branches: native-tls
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3b6a8b1163a6705e9cb07125ea6328eaa656b740
Log:
remove the thread ctx from curl
Changed paths:
M ext/curl/interface.c
M ext/curl/php_curl.h
Diff:
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 6552a21..f5bfb1e 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1290,7 +1290,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
php_curl *ch = (php_curl *) ctx;
php_curl_write *t = ch->handlers->write;
size_t length = size * nmemb;
- TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
#if PHP_CURL_DEBUG
fprintf(stderr, "curl_write() called\n");
@@ -1365,7 +1364,6 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
zval retval;
int error;
zend_fcall_info fci;
- TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
ZVAL_RES(&argv[0], ch->res);
Z_ADDREF(argv[0]);
@@ -1423,7 +1421,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow,
double
zval retval;
int error;
zend_fcall_info fci;
- TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
ZVAL_RES(&argv[0], ch->res);
Z_ADDREF(argv[0]);
@@ -1486,7 +1483,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
zval retval;
int error;
zend_fcall_info fci;
- TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
ZVAL_RES(&argv[0], ch->res);
Z_ADDREF(argv[0]);
@@ -1538,7 +1534,6 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void
*ctx
php_curl *ch = (php_curl *) ctx;
php_curl_write *t = ch->handlers->write_header;
size_t length = size * nmemb;
- TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
switch (t->method) {
case PHP_CURL_STDOUT:
@@ -1628,7 +1623,6 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
zval retval;
int error;
int ret = -1;
- TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
ZVAL_RES(&argv[0], ch->res);
Z_ADDREF(argv[0]);
@@ -1882,7 +1876,6 @@ PHP_FUNCTION(curl_init)
}
ch = alloc_curl_handle();
- TSRMLS_SET_CTX(ch->thread_ctx);
ch->cp = cp;
@@ -1925,7 +1918,6 @@ PHP_FUNCTION(curl_copy_handle)
}
dupch = alloc_curl_handle();
- TSRMLS_SET_CTX(dupch->thread_ctx);
dupch->cp = cp;
Z_ADDREF_P(zid);
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index 2b6ce54..0adb8b5 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -174,7 +174,6 @@ typedef struct {
struct _php_curl_error err;
struct _php_curl_free *to_free;
struct _php_curl_send_headers header;
- void ***thread_ctx;
CURL *cp;
php_curl_handlers *handlers;
zend_resource *res;