X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_request_datashare.c;h=d6cbaa7e1c13568deb52a2fdb00e52adce24f65e;hb=4062420a5e5d301db4a3d820be881e7675a242e1;hp=f44d5b053f5232cc2095bd7765a076458c13a02f;hpb=7dc5de0b79846bfe33ca36a9eeb894ef2ecfdee1;p=m6w6%2Fext-http diff --git a/php_http_request_datashare.c b/php_http_request_datashare.c index f44d5b0..d6cbaa7 100644 --- a/php_http_request_datashare.c +++ b/php_http_request_datashare.c @@ -1,6 +1,7 @@ #include "php_http.h" +#include #include #include @@ -55,7 +56,7 @@ PHP_HTTP_API php_http_request_datashare_t *php_http_request_datashare_init(php_h TSRMLS_SET_CTX(h->ts); } h->ops = ops; - h->rf = rf ? rf : php_http_resource_factory_init(NULL, h->ops->rsrc, NULL, NULL TSRMLS_CC); + h->rf = rf ? rf : php_http_resource_factory_init(NULL, h->ops->rsrc, NULL, NULL); if (h->ops->init) { if (!(h = h->ops->init(h, init_arg))) { @@ -152,11 +153,11 @@ static void detach(void *r, void *h TSRMLS_DC) PHP_HTTP_API void php_http_request_datashare_reset(php_http_request_datashare_t *h) { + TSRMLS_FETCH_FROM_CTX(h->ts); + if (h->ops->reset) { h->ops->reset(h); } else if (h->ops->detach) { - TSRMLS_FETCH_FROM_CTX(h->ts); - zend_llist_apply_with_argument(PHP_HTTP_REQUEST_DATASHARE_REQUESTS(h), detach, h TSRMLS_CC); } @@ -237,7 +238,7 @@ void php_http_request_datashare_object_free(void *object TSRMLS_DC) if (!o->share->persistent) { php_http_request_datashare_free(&o->share); } - zend_object_std_dtor((zend_object *) o); + zend_object_std_dtor((zend_object *) o TSRMLS_CC); efree(o); } @@ -345,7 +346,7 @@ PHP_METHOD(HttpRequestDataShare, reset) PHP_MINIT_FUNCTION(http_request_datashare) { - PHP_HTTP_REGISTER_CLASS(http\\request, DataShare, http_request_datashare, php_http_object_class_entry, 0); + PHP_HTTP_REGISTER_CLASS(http\\Request, DataShare, http_request_datashare, php_http_object_class_entry, 0); php_http_request_datashare_class_entry->create_object = php_http_request_datashare_object_new; memcpy(&php_http_request_datashare_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); php_http_request_datashare_object_handlers.clone_obj = NULL;