diff --git a/src/builders/module.rs b/src/builders/module.rs index 01bc9e4..ee2b219 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/convert.rs b/src/convert.rs index 8782370..e1e2169 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -218,3 +218,13 @@ impl IntoZvalDyn for T { Self::TYPE } } + +impl IntoZvalDyn for Zval { + fn as_zval(&self, _persistent: bool) -> Result { + Ok(self.shallow_clone()) + } + + fn get_type(&self) -> DataType { + self.get_type() + } +}