typo
[m6w6/ext-raphf] / php_raphf.c
index 290ffd5cce5f06a1e8b1454f7139f51ceb491fbb..1de0fc0c2bc780bad5b1f9815b9f021cc1f6d1c2 100644 (file)
@@ -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)
 {