diff --git a/src/builders/module.rs b/src/builders/module.rs index 01bc9e4eb..ee2b219fd 100644 --- a/src/builders/module.rs +++ b/src/builders/module.rs @@ -131,7 +131,8 @@ impl ModuleBuilder { /// This function can be useful if you need to do any final cleanup at the /// very end of a request, after all other resources have been released. For /// example, if your extension creates any persistent resources that last - /// beyond a single request, you could use this function to clean those up. # Arguments + /// beyond a single request, you could use this function to clean those up. + /// # Arguments /// /// * `func` - The function to be called when shutdown is requested. pub fn post_deactivate_function(mut self, func: extern "C" fn() -> i32) -> Self { diff --git a/src/zend/class.rs b/src/zend/class.rs index dc06a3285..6e7f7961d 100644 --- a/src/zend/class.rs +++ b/src/zend/class.rs @@ -79,6 +79,10 @@ impl ClassEntry { Self::try_find(name.as_str().ok()?) } } + + pub fn name(&self) -> Option<&str> { + unsafe { self.name.as_ref().and_then(|s| s.as_str().ok()) } + } } impl PartialEq for ClassEntry {