Mate GlobalExecutor::get_mut() public (#227)

This commit is contained in:
Joe Hoyle 2023-02-07 23:21:53 +02:00 committed by GitHub
parent 87ac43d05e
commit 831b3c8597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ impl ExecutorGlobals {
/// Attempting to retrieve the globals while already holding the global
/// guard will lead to a deadlock. Dropping the globals guard will release
/// the lock.
fn get_mut() -> GlobalWriteGuard<Self> {
pub fn get_mut() -> GlobalWriteGuard<Self> {
// SAFETY: PHP executor globals are statically declared therefore should never
// return an invalid pointer.
let globals = unsafe { ext_php_rs_executor_globals().as_mut() }