remove the thread ctx from curl

This commit is contained in:
Anatol Belski 2014-12-17 11:38:46 +01:00
parent 386cb177bd
commit 3b6a8b1163
2 changed files with 0 additions and 9 deletions

View file

@ -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);

View file

@ -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;