X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_pool.c;h=9ee6f7682056802700aef95cb43578f305cc0193;hp=379e3b152d4ee202d5b30c9c3f7d48ddb8d62bb3;hb=8d05291f42b3b42159b3fe91492aa4862f3d4405;hpb=7dc5de0b79846bfe33ca36a9eeb894ef2ecfdee1 diff --git a/php_http_request_pool.c b/php_http_request_pool.c index 379e3b1..9ee6f76 100644 --- a/php_http_request_pool.c +++ b/php_http_request_pool.c @@ -1,3 +1,14 @@ +/* + +--------------------------------------------------------------------+ + | PECL :: http | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2004-2011, Michael Wallner | + +--------------------------------------------------------------------+ +*/ #include "php_http.h" @@ -14,7 +25,7 @@ PHP_HTTP_API php_http_request_pool_t *php_http_request_pool_init(php_http_reques memset(h, 0, sizeof(*h)); 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); zend_llist_init(&h->requests.attached, sizeof(zval *), (llist_dtor_func_t) ZVAL_PTR_DTOR, 0); zend_llist_init(&h->requests.finished, sizeof(zval *), (llist_dtor_func_t) ZVAL_PTR_DTOR, 0); TSRMLS_SET_CTX(h->ts); @@ -72,7 +83,7 @@ PHP_HTTP_API STATUS php_http_request_pool_attach(php_http_request_pool_t *h, zva php_http_message_body_t *body = NULL; php_http_request_object_t *obj = zend_object_store_get_object(request TSRMLS_CC); - if (SUCCESS != php_http_request_object_requesthandler(obj, request, &m, &url, &body)) { + if (SUCCESS != php_http_request_object_requesthandler(obj, request, &m, &url, &body TSRMLS_CC)) { return FAILURE; } if (SUCCESS == h->ops->attach(h, obj->request, m, url, body)) { @@ -130,8 +141,6 @@ PHP_HTTP_API int php_http_request_pool_once(php_http_request_pool_t *h) PHP_HTTP_API STATUS php_http_request_pool_exec(php_http_request_pool_t *h) { - TSRMLS_FETCH_FROM_CTX(h->ts); - if (h->ops->exec) { return h->ops->exec(h); } @@ -556,13 +565,23 @@ PHP_METHOD(HttpRequestPool, enableEvents) PHP_MINIT_FUNCTION(http_request_pool) { - PHP_HTTP_REGISTER_CLASS(http\\request, Pool, http_request_pool, php_http_object_class_entry, 0); + PHP_HTTP_REGISTER_CLASS(http\\Request, Pool, http_request_pool, php_http_object_class_entry, 0); php_http_request_pool_class_entry->create_object = php_http_request_pool_object_new; memcpy(&php_http_request_pool_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); php_http_request_pool_object_handlers.clone_obj = NULL; - zend_class_implements(php_http_request_pool_class_entry TSRMLS_CC, 3, spl_ce_Countable, zend_ce_iterator, php_http_fluently_callable_class_entry); + zend_class_implements(php_http_request_pool_class_entry TSRMLS_CC, 2, spl_ce_Countable, zend_ce_iterator); return SUCCESS; } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */ +