/* resource_factory ops */
-static void *php_http_curl_ctor(void *opaque TSRMLS_DC)
+static void *php_http_curl_ctor(void *opaque, void *init_arg TSRMLS_DC)
{
void *ch;
php_http_curl_client_t *ctx;
TSRMLS_FETCH_FROM_CTX(h->ts);
- if (!handle && !(handle = php_http_resource_factory_handle_ctor(h->rf TSRMLS_CC))) {
+ if (!handle && !(handle = php_resource_factory_handle_ctor(h->rf, NULL TSRMLS_CC))) {
php_http_error(HE_WARNING, PHP_HTTP_E_CLIENT, "could not initialize curl handle");
return NULL;
}
void *copy;
TSRMLS_FETCH_FROM_CTX(from->ts);
- if (!(copy = php_http_resource_factory_handle_copy(from->rf, ctx->handle TSRMLS_CC))) {
+ if (!(copy = php_resource_factory_handle_copy(from->rf, ctx->handle TSRMLS_CC))) {
return NULL;
}
curl_easy_setopt(ctx->handle, CURLOPT_VERBOSE, 0L);
curl_easy_setopt(ctx->handle, CURLOPT_DEBUGFUNCTION, NULL);
- php_http_resource_factory_handle_dtor(h->rf, ctx->handle TSRMLS_CC);
+ php_resource_factory_handle_dtor(h->rf, ctx->handle TSRMLS_CC);
php_http_buffer_dtor(&ctx->options.ranges);
php_http_buffer_dtor(&ctx->options.cookies);
return SUCCESS;
}
-static php_http_resource_factory_ops_t php_http_curl_client_resource_factory_ops = {
+static php_resource_factory_ops_t php_http_curl_client_resource_factory_ops = {
php_http_curl_ctor,
php_http_curl_copy,
php_http_curl_dtor
{
php_http_options_t *options;
- if (SUCCESS != php_http_persistent_handle_provide(ZEND_STRL("http_client.curl"), &php_http_curl_client_resource_factory_ops, NULL, NULL)) {
+ if (SUCCESS != php_persistent_handle_provide(ZEND_STRL("http_client.curl"), &php_http_curl_client_resource_factory_ops, NULL, NULL)) {
return FAILURE;
}