Skip to content

Commit 3b6a8b1

Browse files
committed
remove the thread ctx from curl
1 parent 386cb17 commit 3b6a8b1

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

ext/curl/interface.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
12901290
php_curl *ch = (php_curl *) ctx;
12911291
php_curl_write *t = ch->handlers->write;
12921292
size_t length = size * nmemb;
1293-
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
12941293

12951294
#if PHP_CURL_DEBUG
12961295
fprintf(stderr, "curl_write() called\n");
@@ -1365,7 +1364,6 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
13651364
zval retval;
13661365
int error;
13671366
zend_fcall_info fci;
1368-
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
13691367

13701368
ZVAL_RES(&argv[0], ch->res);
13711369
Z_ADDREF(argv[0]);
@@ -1423,7 +1421,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
14231421
zval retval;
14241422
int error;
14251423
zend_fcall_info fci;
1426-
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
14271424

14281425
ZVAL_RES(&argv[0], ch->res);
14291426
Z_ADDREF(argv[0]);
@@ -1486,7 +1483,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
14861483
zval retval;
14871484
int error;
14881485
zend_fcall_info fci;
1489-
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
14901486

14911487
ZVAL_RES(&argv[0], ch->res);
14921488
Z_ADDREF(argv[0]);
@@ -1538,7 +1534,6 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
15381534
php_curl *ch = (php_curl *) ctx;
15391535
php_curl_write *t = ch->handlers->write_header;
15401536
size_t length = size * nmemb;
1541-
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
15421537

15431538
switch (t->method) {
15441539
case PHP_CURL_STDOUT:
@@ -1628,7 +1623,6 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
16281623
zval retval;
16291624
int error;
16301625
int ret = -1;
1631-
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
16321626

16331627
ZVAL_RES(&argv[0], ch->res);
16341628
Z_ADDREF(argv[0]);
@@ -1882,7 +1876,6 @@ PHP_FUNCTION(curl_init)
18821876
}
18831877

18841878
ch = alloc_curl_handle();
1885-
TSRMLS_SET_CTX(ch->thread_ctx);
18861879

18871880
ch->cp = cp;
18881881

@@ -1925,7 +1918,6 @@ PHP_FUNCTION(curl_copy_handle)
19251918
}
19261919

19271920
dupch = alloc_curl_handle();
1928-
TSRMLS_SET_CTX(dupch->thread_ctx);
19291921

19301922
dupch->cp = cp;
19311923
Z_ADDREF_P(zid);

ext/curl/php_curl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ typedef struct {
174174
struct _php_curl_error err;
175175
struct _php_curl_free *to_free;
176176
struct _php_curl_send_headers header;
177-
void ***thread_ctx;
178177
CURL *cp;
179178
php_curl_handlers *handlers;
180179
zend_resource *res;

0 commit comments

Comments
 (0)