*/
static HashTable php_http_client_drivers;
-STATUS php_http_client_driver_add(php_http_client_driver_t *driver)
+ZEND_RESULT_CODE php_http_client_driver_add(php_http_client_driver_t *driver)
{
return zend_hash_add(&php_http_client_drivers, driver->name_str, driver->name_len + 1, (void *) driver, sizeof(php_http_client_driver_t), NULL);
}
-STATUS php_http_client_driver_get(const char *name_str, size_t name_len, php_http_client_driver_t *driver)
+ZEND_RESULT_CODE php_http_client_driver_get(const char *name_str, size_t name_len, php_http_client_driver_t *driver)
{
php_http_client_driver_t *tmp;
}
}
-STATUS php_http_client_enqueue(php_http_client_t *h, php_http_client_enqueue_t *enqueue)
+ZEND_RESULT_CODE php_http_client_enqueue(php_http_client_t *h, php_http_client_enqueue_t *enqueue)
{
TSRMLS_FETCH_FROM_CTX(h->ts);
return FAILURE;
}
-STATUS php_http_client_dequeue(php_http_client_t *h, php_http_message_t *request)
+ZEND_RESULT_CODE php_http_client_dequeue(php_http_client_t *h, php_http_message_t *request)
{
TSRMLS_FETCH_FROM_CTX(h->ts);
return el ? (php_http_client_enqueue_t *) el->data : NULL;
}
-STATUS php_http_client_wait(php_http_client_t *h, struct timeval *custom_timeout)
+ZEND_RESULT_CODE php_http_client_wait(php_http_client_t *h, struct timeval *custom_timeout)
{
if (h->ops->wait) {
return h->ops->wait(h, custom_timeout);
return FAILURE;
}
-STATUS php_http_client_exec(php_http_client_t *h)
+ZEND_RESULT_CODE php_http_client_exec(php_http_client_t *h)
{
if (h->ops->exec) {
return h->ops->exec(h);
zend_llist_clean(&h->responses);
}
-STATUS php_http_client_setopt(php_http_client_t *h, php_http_client_setopt_opt_t opt, void *arg)
+ZEND_RESULT_CODE php_http_client_setopt(php_http_client_t *h, php_http_client_setopt_opt_t opt, void *arg)
{
if (h->ops->setopt) {
return h->ops->setopt(h, opt, arg);
return FAILURE;
}
-STATUS php_http_client_getopt(php_http_client_t *h, php_http_client_getopt_opt_t opt, void *arg, void *res_ptr)
+ZEND_RESULT_CODE php_http_client_getopt(php_http_client_t *h, php_http_client_getopt_opt_t opt, void *arg, void *res_ptr)
{
if (h->ops->getopt) {
return h->ops->getopt(h, opt, arg, res_ptr);
zval_ptr_dtor(&new_hist);
}
-static STATUS handle_response(void *arg, php_http_client_t *client, php_http_client_enqueue_t *e, php_http_message_t **response)
+static ZEND_RESULT_CODE handle_response(void *arg, php_http_client_t *client, php_http_client_enqueue_t *e, php_http_message_t **response)
{
zend_bool dequeue = 0;
zval zclient;
php_http_pretty_key(name_str + sizeof("http\\Client"), driver.name_len, 1, 1);
if ((pf = php_persistent_handle_concede(NULL , name_str, name_len, persistent_handle_str, persistent_handle_len, NULL, NULL TSRMLS_CC))) {
- rf = php_resource_factory_init(NULL, php_persistent_handle_get_resource_factory_ops(), pf, (void (*)(void *)) php_persistent_handle_abandon);
+ rf = php_persistent_handle_resource_factory_init(NULL, pf);
}
efree(name_str);