Skip to content

Commit e3fde21

Browse files
committed
refactor(globals): use symbol table from ExecutorGlobals
Refs: #331
1 parent 6261e04 commit e3fde21

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/zend/globals.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::exception::PhpResult;
1313
#[cfg(not(any(php80, php81)))]
1414
use crate::ffi::zend_atomic_bool_store;
1515
use crate::ffi::{
16-
_sapi_module_struct, _zend_executor_globals, executor_globals, ext_php_rs_executor_globals,
16+
_sapi_module_struct, _zend_executor_globals, ext_php_rs_executor_globals,
1717
ext_php_rs_file_globals, ext_php_rs_process_globals, ext_php_rs_sapi_globals,
1818
ext_php_rs_sapi_module, php_core_globals, php_file_globals, sapi_globals_struct,
1919
sapi_header_struct, sapi_headers_struct, sapi_request_info, zend_ini_entry,
@@ -307,10 +307,11 @@ impl ProcessGlobals {
307307
panic!("Failed to get request global");
308308
}
309309

310+
let symbol_table = &ExecutorGlobals::get().symbol_table;
310311
#[cfg(php80)]
311-
let request = unsafe { _zend_hash_find_known_hash(&executor_globals.symbol_table, key) };
312+
let request = unsafe { _zend_hash_find_known_hash(symbol_table, key) };
312313
#[cfg(not(php80))]
313-
let request = unsafe { zend_hash_find_known_hash(&executor_globals.symbol_table, key) };
314+
let request = unsafe { zend_hash_find_known_hash(symbol_table, key) };
314315

315316
if request.is_null() {
316317
return None;

0 commit comments

Comments
 (0)