Skip to content

Commit bb8f608

Browse files
authored
Merge pull request #258 from davidcole1340/functions-table-mut
Add helper method for function table
2 parents 80e448c + ede1d8e commit bb8f608

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
@@ -61,6 +61,16 @@ impl ExecutorGlobals {
6161
unsafe { self.class_table.as_ref() }
6262
}
6363

64+
/// Attempts to retrieve the global functions hash table.
65+
pub fn function_table(&self) -> Option<&ZendHashTable> {
66+
unsafe { self.function_table.as_ref() }
67+
}
68+
69+
/// Attempts to retrieve the global functions hash table as mutable.
70+
pub fn function_table_mut(&self) -> Option<&mut ZendHashTable> {
71+
unsafe { self.function_table.as_mut() }
72+
}
73+
6474
/// Retrieves the ini values for all ini directives in the current executor
6575
/// context..
6676
pub fn ini_values(&self) -> HashMap<String, Option<String>> {

0 commit comments

Comments
 (0)