X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_raphf.c;h=1de0fc0c2bc780bad5b1f9815b9f021cc1f6d1c2;hb=3233c1f56cfce72c079fc2bc033f16c7f4e3fc68;hp=290ffd5cce5f06a1e8b1454f7139f51ceb491fbb;hpb=b6e849c8e6f0b821e07ad74b3d4a3d5ab0129ab8;p=m6w6%2Fext-raphf diff --git a/php_raphf.c b/php_raphf.c index 290ffd5..1de0fc0 100644 --- a/php_raphf.c +++ b/php_raphf.c @@ -38,6 +38,8 @@ ZEND_END_MODULE_GLOBALS(raphf) ZEND_DECLARE_MODULE_GLOBALS(raphf) #if PHP_VERSION_ID < 50500 +#undef SUCCESS +#undef FAILURE typedef enum { SUCCESS = 0, FAILURE = -1 @@ -123,6 +125,20 @@ void php_resource_factory_handle_dtor(php_resource_factory_t *f, } } +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) {