Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/builders/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 10 additions & 0 deletions src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,13 @@ impl<T: IntoZval + Clone> IntoZvalDyn for T {
Self::TYPE
}
}

impl IntoZvalDyn for Zval {
fn as_zval(&self, _persistent: bool) -> Result<Zval> {
Ok(self.shallow_clone())
}

fn get_type(&self) -> DataType {
self.get_type()
}
}