X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_api.h;h=28e3a852e0f80624745097a2577e2ecb2dd1e0d5;hp=731cbf0e7059841fa20ff288227325db6d3da4f4;hb=ecdfaaaf81cc29f99e39252b6f2463d328812cbf;hpb=90e21e68c6e34565be798ee0f225b5823016afce diff --git a/php_http_request_api.h b/php_http_request_api.h index 731cbf0..28e3a85 100644 --- a/php_http_request_api.h +++ b/php_http_request_api.h @@ -50,6 +50,13 @@ 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_free(c) _http_curl_free(c) +PHP_HTTP_API void _http_curl_free(CURL **ch); + #define http_request_new() _http_request_init_ex(NULL, NULL, 0, NULL ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) #define http_request_init(r) _http_request_init_ex((r), NULL, 0, NULL ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) #define http_request_init_ex(r, c, m, u) _http_request_init_ex((r), (c), (m), (u) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC)