From: Michael Wallner Date: Wed, 15 Jul 2015 08:55:05 +0000 (+0200) Subject: provide RTLD_LAZY compatibility X-Git-Tag: release-2.0.0RC1~16 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=177e968e112ea8030065d5d7a4907bcaefa9b085;p=m6w6%2Fext-raphf provide RTLD_LAZY compatibility --- diff --git a/php_raphf.c b/php_raphf.c index 3f27ab3..f867af6 100644 --- a/php_raphf.c +++ b/php_raphf.c @@ -115,6 +115,19 @@ void php_resource_factory_handle_dtor(php_resource_factory_t *f, void *handle) } } +php_resource_factory_t *php_persistent_handle_resource_factory_init( + php_resource_factory_t *a, php_persistent_handle_factory_t *pf) +{ + return php_resource_factory_init(a, + php_persistent_handle_get_resource_factory_ops(), pf, + (void(*)(void*)) php_persistent_handle_abandon); +} + +zend_bool php_resource_factory_is_persistent(php_resource_factory_t *a) +{ + return a->dtor == (void(*)(void *)) php_persistent_handle_abandon; +} + static inline php_persistent_handle_list_t *php_persistent_handle_list_init( php_persistent_handle_list_t *list) { diff --git a/php_raphf.h b/php_raphf.h index 9df45aa..c5e4f35 100644 --- a/php_raphf.h +++ b/php_raphf.h @@ -360,6 +360,13 @@ PHP_RAPHF_API void *php_persistent_handle_accrete( PHP_RAPHF_API php_resource_factory_ops_t * php_persistent_handle_get_resource_factory_ops(void); +PHP_RAPHF_API php_resource_factory_t * +php_persistent_handle_resource_factory_init(php_resource_factory_t *a, + php_persistent_handle_factory_t *pf); + +PHP_RAPHF_API zend_bool php_resource_factory_is_persistent( + php_resource_factory_t *a); + /** * Clean persistent handles up. *