From: Michael Wallner Date: Mon, 13 Feb 2006 21:42:16 +0000 (+0000) Subject: - fix HttpRequest::getResponseCookies() X-Git-Tag: RELEASE_0_23_0~13 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=74b9f91575137bb94dfccb54bd5fd6a17d077c43;p=m6w6%2Fext-http - fix HttpRequest::getResponseCookies() --- diff --git a/http_cookie_api.c b/http_cookie_api.c index bc02315..d43d0fe 100644 --- a/http_cookie_api.c +++ b/http_cookie_api.c @@ -26,10 +26,10 @@ PHP_MINIT_FUNCTION(http_cookie) return SUCCESS; } -PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list TSRMLS_DC) +PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC) { if (!list) { - list = emalloc(sizeof(http_cookie_list)); + list = emalloc_rel(sizeof(http_cookie_list)); } zend_hash_init(&list->cookies, 0, NULL, ZVAL_PTR_DTOR, 0); diff --git a/http_request_api.c b/http_request_api.c index dc83d23..3fa73e2 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -871,7 +871,7 @@ PHP_HTTP_API void _http_request_info(http_request *request, HashTable *info) HTTP_CURL_INFO(CURLINFO_CONTENT_TYPE); HTTP_CURL_INFO(CURLINFO_HTTPAUTH_AVAIL); HTTP_CURL_INFO(CURLINFO_PROXYAUTH_AVAIL); - /*HTTP_CURL_INFO(OS_ERRNO);*/ + HTTP_CURL_INFO(CURLINFO_OS_ERRNO); HTTP_CURL_INFO(CURLINFO_NUM_CONNECTS); #if LIBCURL_VERSION_NUM >= 0x070e01 HTTP_CURL_INFO_EX(CURLINFO_COOKIELIST, "cookies"); diff --git a/http_request_object.c b/http_request_object.c index 93ce010..40b9dd3 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -1555,7 +1555,7 @@ PHP_METHOD(HttpRequest, getResponseCookies) object_init(cookie); http_cookie_list_tostruct(&list, cookie); add_next_index_zval(return_value, cookie); - zval_ptr_dtor(&cookie); + http_cookie_list_dtor(&list); } zval_ptr_dtor(single_header); } @@ -1569,7 +1569,7 @@ PHP_METHOD(HttpRequest, getResponseCookies) object_init(cookie); http_cookie_list_tostruct(&list, cookie); add_next_index_zval(return_value, cookie); - zval_ptr_dtor(&cookie); + http_cookie_list_dtor(&list); } zval_ptr_dtor(header); } diff --git a/php_http_cookie_api.h b/php_http_cookie_api.h index c06e7ca..2a9d628 100644 --- a/php_http_cookie_api.h +++ b/php_http_cookie_api.h @@ -36,9 +36,9 @@ typedef struct { time_t expires; } http_cookie_list; -#define http_cookie_list_new() _http_cookie_list_init(NULL TSRMLS_CC) -#define http_cookie_list_init(l) _http_cookie_list_init((l) TSRMLS_CC) -PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list TSRMLS_DC); +#define http_cookie_list_new() _http_cookie_list_init(NULL ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) +#define http_cookie_list_init(l) _http_cookie_list_init((l) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) +PHP_HTTP_API http_cookie_list *_http_cookie_list_init(http_cookie_list *list ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC); #define http_cookie_list_dtor(l) _http_cookie_list_dtor((l) TSRMLS_CC) PHP_HTTP_API void _http_cookie_list_dtor(http_cookie_list *list TSRMLS_DC);