From dbb10c775e24bf591305aa5b3946d4e94a500530 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 21 Jul 2015 11:21:38 +0200 Subject: [PATCH] provide RTLD_LAZY compatibility --- php_http_client.c | 2 +- php_http_client_curl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/php_http_client.c b/php_http_client.c index 364903e..160e8bb 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -533,7 +533,7 @@ static PHP_METHOD(HttpClient, __construct) 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); diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 4634b79..78c552a 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -2117,7 +2117,7 @@ static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e } /* only if the client itself is setup for persistence */ - if (h->rf->dtor == (void (*)(void*)) php_persistent_handle_abandon) { + if (php_resource_factory_is_persistent(h->rf)) { char *id_str = NULL; size_t id_len; int port = url->port ? url->port : 80; @@ -2138,7 +2138,7 @@ static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e } if (pf) { - 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); } else { rf = php_resource_factory_init(NULL, &php_http_curle_resource_factory_ops, NULL, NULL); } -- 2.30.2