]> granicus.if.org Git - php/commitdiff
remove the thread ctx from curl
authorAnatol Belski <ab@php.net>
Wed, 17 Dec 2014 10:38:46 +0000 (11:38 +0100)
committerAnatol Belski <ab@php.net>
Wed, 17 Dec 2014 10:38:46 +0000 (11:38 +0100)
ext/curl/interface.c
ext/curl/php_curl.h

index 6552a211f001b17f1794793dc8e08f3d9c2ddfa5..f5bfb1e91928e37d5907f6623c6777d4f727b3dd 100644 (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);
index 2b6ce548d00f8ed1ccadd61fc1ed995dc775837a..0adb8b5ae20cfdadbd9a919665d71cbd0a3ac391 100644 (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;