Skip to content

Commit 89c7758

Browse files
committed
Add helper method for function table
1 parent 42ef04a commit 89c7758

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/zend/globals.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ impl ExecutorGlobals {
5151
unsafe { self.class_table.as_ref() }
5252
}
5353

54+
/// Attempts to retrieve the global functions hash table.
55+
pub fn function_table(&self) -> Option<&ZendHashTable> {
56+
unsafe { self.function_table.as_ref() }
57+
}
58+
59+
/// Attempts to retrieve the global functions hash table as mutable.
60+
pub fn function_table_mut(&self) -> Option<&mut ZendHashTable> {
61+
unsafe { self.function_table.as_mut() }
62+
}
63+
5464
/// Attempts to retrieve the global constants table.
5565
pub fn constants(&self) -> Option<&ZendHashTable> {
5666
unsafe { self.zend_constants.as_ref() }

0 commit comments

Comments
 (0)