fix ZTS
authorMichael Wallner <mike@php.net>
Tue, 20 Aug 2013 10:17:40 +0000 (12:17 +0200)
committerMichael Wallner <mike@php.net>
Tue, 20 Aug 2013 10:17:40 +0000 (12:17 +0200)
php_raphf.c
php_raphf.h

index f9f354a2cd8503a49f2feaeec80bbc05922aec97..1f98145ff756a09e91d3c8cf69150a9f17be5d08 100644 (file)
@@ -564,7 +564,7 @@ PHP_INI_END()
 
 static HashTable *php_persistent_handles_global_hash;
 
-static void php_raphf_globals_init(zend_raphf_globals *raphf_globals)
+static PHP_GINIT_FUNCTION(raphf)
 {
        raphf_globals->persistent_handle.limit = -1;
 
@@ -577,17 +577,14 @@ static void php_raphf_globals_init(zend_raphf_globals *raphf_globals)
        }
 }
 
-static void php_raphf_globals_dtor(zend_raphf_globals *raphf_globals)
+static PHP_GSHUTDOWN_FUNCTION(raphf)
 {
        zend_hash_destroy(&raphf_globals->persistent_handle.hash);
 }
 
 PHP_MINIT_FUNCTION(raphf)
 {
-       ZEND_INIT_MODULE_GLOBALS(raphf, php_raphf_globals_init,
-                       php_raphf_globals_dtor);
        php_persistent_handles_global_hash = &PHP_RAPHF_G->persistent_handle.hash;
-
        REGISTER_INI_ENTRIES();
        return SUCCESS;
 }
@@ -659,7 +656,11 @@ zend_module_entry raphf_module_entry = {
        NULL,
        PHP_MINFO(raphf),
        PHP_RAPHF_VERSION,
-       STANDARD_MODULE_PROPERTIES
+       ZEND_MODULE_GLOBALS(raphf),
+       PHP_GINIT(raphf),
+       PHP_GSHUTDOWN(raphf),
+       NULL,
+       STANDARD_MODULE_PROPERTIES_EX
 };
 /* }}} */
 
index 3ba068e4a9f88653c95c2d725aa81f7350d71ace..2ca15210b0866989d85468c1f7b7edb3a95783b6 100644 (file)
@@ -16,7 +16,7 @@
 extern zend_module_entry raphf_module_entry;
 #define phpext_raphf_ptr &raphf_module_entry
 
-#define PHP_RAPHF_VERSION "1.0.1"
+#define PHP_RAPHF_VERSION "1.0.2dev"
 
 #ifdef PHP_WIN32
 #      define PHP_RAPHF_API __declspec(dllexport)
@@ -106,7 +106,10 @@ PHP_RAPHF_API int /* SUCCESS|FAILURE */ php_persistent_handle_provide(
                const char *name_str, size_t name_len, php_resource_factory_ops_t *fops,
                void *data, void (*dtor)(void *) TSRMLS_DC);
 PHP_RAPHF_API php_persistent_handle_factory_t *php_persistent_handle_concede(
-               php_persistent_handle_factory_t *a, const char *name_str, size_t name_len, const char *ident_str, size_t ident_len,php_persistent_handle_wakeup_t wakeup, php_persistent_handle_retire_t retire TSRMLS_DC);
+               php_persistent_handle_factory_t *a, const char *name_str,
+               size_t name_len, const char *ident_str, size_t ident_len,
+               php_persistent_handle_wakeup_t wakeup,
+               php_persistent_handle_retire_t retire TSRMLS_DC);
 PHP_RAPHF_API void php_persistent_handle_abandon(
                php_persistent_handle_factory_t *a);
 PHP_RAPHF_API void *php_persistent_handle_acquire(