X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_methods.c;fp=http_methods.c;h=e10923b2b473a2e30d09c6cd9b1e0829c4eb37cb;hp=053fce7b232ee97845beb5a62b98d7bcbbbd38ff;hb=2269e8e11a6837fc165ae85406ea6db84c1995cc;hpb=b272c1e03de58ff0c01f78421b824c7f45d43959 diff --git a/http_methods.c b/http_methods.c index 053fce7..e10923b 100644 --- a/http_methods.c +++ b/http_methods.c @@ -2143,7 +2143,7 @@ PHP_METHOD(HttpRequest, send) /* {{{ HttpRequestPool */ -/* {{{ proto void HttpRequestPool::__construct(void) +/* {{{ proto void HttpRequestPool::__construct() * * Instantiate a new HttpRequestPool object. */ @@ -2153,13 +2153,31 @@ PHP_METHOD(HttpRequestPool, __construct) } /* }}} */ +/* {{{ proto void HttpRequestPool::__destruct() + * + * Clean up HttpRequestPool object. + */ PHP_METHOD(HttpRequestPool, __destruct) { getObject(http_requestpool_object, obj); - + + NO_ARGS; + + http_request_pool_detach_all(&obj->pool); +} +/* }}} */ + +/* {{{ proto void HttpRequestPool::reset() + * + * Detach all attached HttpRequest objects. + */ +PHP_METHOD(HttpRequestPool, reset) +{ + getObject(http_requestpool_object, obj); + NO_ARGS; - - http_requestpool_object_ondestruct(&obj->pool); + + http_request_pool_detach_all(&obj->pool); } /* {{{ proto bool HttpRequestPool::attach(HttpRequest request)