provide RTLD_LAZY compatibility
authorMichael Wallner <mike@php.net>
Wed, 15 Jul 2015 08:55:05 +0000 (10:55 +0200)
committerMichael Wallner <mike@php.net>
Wed, 15 Jul 2015 08:55:05 +0000 (10:55 +0200)
php_raphf.c
php_raphf.h

index 3f27ab3e7e14f21479f682ae7bf118971e5e7efd..f867af6d7a13137f17fad2d40d69a542ceb94e10 100644 (file)
@@ -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)
 {
index 9df45aa12e3c5e5f71a9d75629b0ffe4126eb134..c5e4f355f4bbcffe3ce6b5f65cf35f2d4b82c083 100644 (file)
@@ -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.
  *