Skip to content

Commit 4b1afc8

Browse files
committed
move id initialization into ctor
1 parent 2b7e546 commit 4b1afc8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,11 +2080,6 @@ static void accel_activate(void)
20802080
ZCG(cwd_key_len) = 0;
20812081
ZCG(cwd_check) = 1;
20822082

2083-
#ifdef ZTS
2084-
/* TODO refactor to init this just once. */
2085-
accel_gen_system_id();
2086-
#endif
2087-
20882083
#ifdef HAVE_OPCACHE_FILE_CACHE
20892084
if (ZCG(accel_directives).file_cache_only) {
20902085
return;
@@ -2548,6 +2543,9 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
25482543
ZEND_TSRMLS_CACHE_UPDATE();
25492544
#endif
25502545
memset(accel_globals, 0, sizeof(zend_accel_globals));
2546+
2547+
/* TODO refactor to init this just once. */
2548+
accel_gen_system_id();
25512549
}
25522550

25532551
static void accel_globals_internal_func_dtor(zval *zv)

0 commit comments

Comments
 (0)