Changeset 92
- Timestamp:
- 07/16/2006 06:33:59 AM (2 years ago)
- Files:
-
- 1 modified
-
trunk/xcache.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r91 r92 1063 1063 } 1064 1064 /* }}} */ 1065 static void xc_init_globals(zend_xcache_globals* xc_globals TSRMLS_DC) /* {{{ */ 1066 { 1067 memset(xc_globals, 0, sizeof(zend_xcache_globals)); 1068 } 1069 /* }}} */ 1070 static void xc_shutdown_globals(zend_xcache_globals* xc_globals TSRMLS_DC) /* {{{ */ 1065 /* {{{ PHP_GINIT_FUNCTION(xcache) */ 1066 static 1067 #ifdef PHP_GINIT_FUNCTION 1068 PHP_GINIT_FUNCTION(xcache) 1069 #else 1070 void xc_init_globals(zend_xcache_globals* xcache_globals TSRMLS_DC) 1071 #endif 1072 { 1073 memset(xcache_globals, 0, sizeof(zend_xcache_globals)); 1074 } 1075 /* }}} */ 1076 /* {{{ PHP_GSHUTDOWN_FUNCTION(xcache) */ 1077 static 1078 #ifdef PHP_GSHUTDOWN_FUNCTION 1079 PHP_GSHUTDOWN_FUNCTION(xcache) 1080 #else 1081 void xc_shutdown_globals(zend_xcache_globals* xcache_globals TSRMLS_DC) 1082 #endif 1071 1083 { 1072 1084 int i; 1073 1085 1074 if (xc _globals->php_holds != NULL) {1086 if (xcache_globals->php_holds != NULL) { 1075 1087 for (i = 0; i < xc_php_hcache.size; i ++) { 1076 xc_stack_destroy(&xc _globals->php_holds[i]);1077 } 1078 free(xc _globals->php_holds);1079 xc _globals->php_holds = NULL;1080 } 1081 1082 if (xc _globals->var_holds != NULL) {1088 xc_stack_destroy(&xcache_globals->php_holds[i]); 1089 } 1090 free(xcache_globals->php_holds); 1091 xcache_globals->php_holds = NULL; 1092 } 1093 1094 if (xcache_globals->var_holds != NULL) { 1083 1095 for (i = 0; i < xc_var_hcache.size; i ++) { 1084 xc_stack_destroy(&xc _globals->var_holds[i]);1085 } 1086 free(xc _globals->var_holds);1087 xc _globals->var_holds = NULL;1096 xc_stack_destroy(&xcache_globals->var_holds[i]); 1097 } 1098 free(xcache_globals->var_holds); 1099 xcache_globals->var_holds = NULL; 1088 1100 } 1089 1101 } … … 1985 1997 } 1986 1998 1999 #ifndef PHP_GINIT 1987 2000 ZEND_INIT_MODULE_GLOBALS(xcache, xc_init_globals, xc_shutdown_globals); 2001 #endif 1988 2002 REGISTER_INI_ENTRIES(); 1989 2003 … … 2060 2074 xc_coredump_dir = NULL; 2061 2075 } 2062 #ifdef ZTS 2076 #ifndef PHP_GINIT 2077 # ifdef ZTS 2063 2078 ts_free_id(xcache_globals_id); 2064 # else2079 # else 2065 2080 xc_shutdown_globals(&xcache_globals TSRMLS_CC); 2081 # endif 2066 2082 #endif 2067 2083 … … 2108 2124 PHP_MINFO(xcache), 2109 2125 XCACHE_VERSION, 2126 #ifdef PHP_GINIT 2127 PHP_MODULE_GLOBALS(xcache), 2128 PHP_GINIT(xcache), 2129 PHP_GSHUTDOWN(xcache), 2130 #endif 2110 2131 #ifdef ZEND_ENGINE_2 2111 2132 ZEND_MODULE_POST_ZEND_DEACTIVATE_N(xcache),

