From: Michael Wallner Date: Wed, 15 Jul 2015 08:56:34 +0000 (+0200) Subject: provide RTLD_LAZY compatibility X-Git-Tag: RELEASE_3_0_0_RC1~39 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=7493ad081ec06081cb8ca0f804d98a263f93ffbc provide RTLD_LAZY compatibility Closes gh-issue #4 Avoid using php_peristent_handle_abandon function pointer. See also https://github.com/m6w6/ext-raphf/commit/177e968e112ea8030065d5d7a4907bcaefa9b085 --- diff --git a/php_http_client.c b/php_http_client.c index f64731e..5d78803 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -507,7 +507,7 @@ static PHP_METHOD(HttpClient, __construct) php_persistent_handle_factory_t *pf; if ((pf = php_persistent_handle_concede(NULL, driver->client_name, persistent_handle_name, NULL, NULL))) { - 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); } } diff --git a/php_http_client_curl.c b/php_http_client_curl.c index a9b8c7f..b91fe48 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -2136,7 +2136,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)) { zend_string *id; char *id_str = NULL; size_t id_len; @@ -2158,7 +2158,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); }