X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_request_api.h;h=5b4b752b311f9f2d6a1a7ba071b4b3f63b31f6ef;hb=e78857a010ae86f5dddb593cbe96d67e5bd6f13d;hp=28e3a852e0f80624745097a2577e2ecb2dd1e0d5;hpb=ecdfaaaf81cc29f99e39252b6f2463d328812cbf;p=m6w6%2Fext-http diff --git a/php_http_request_api.h b/php_http_request_api.h index 28e3a85..5b4b752 100644 --- a/php_http_request_api.h +++ b/php_http_request_api.h @@ -23,7 +23,7 @@ extern PHP_MINIT_FUNCTION(http_request); extern PHP_MSHUTDOWN_FUNCTION(http_request); -typedef struct { +typedef struct _http_request_t { CURL *ch; char *url; http_request_method meth; @@ -50,9 +50,9 @@ typedef struct { } http_request; -#define http_curl_init(r) http_curl_init_ex(NULL, (r), (r)->_error) -#define http_curl_init_ex(c, r, e) _http_curl_init_ex((c), (r), (e)) -PHP_HTTP_API CURL *_http_curl_init_ex(CURL *ch, void *context, char *error_buffer); +#define http_curl_init(r) http_curl_init_ex(NULL, (r)) +#define http_curl_init_ex(c, r) _http_curl_init_ex((c), (r)) +PHP_HTTP_API CURL *_http_curl_init_ex(CURL *ch, http_request *request); #define http_curl_free(c) _http_curl_free(c) PHP_HTTP_API void _http_curl_free(CURL **ch);