aboutsummaryrefslogtreecommitdiff
path: root/nix-rust
diff options
context:
space:
mode:
Diffstat (limited to 'nix-rust')
-rw-r--r--nix-rust/src/c.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/nix-rust/src/c.rs b/nix-rust/src/c.rs
index c1358545f..dc2f8ddf5 100644
--- a/nix-rust/src/c.rs
+++ b/nix-rust/src/c.rs
@@ -65,6 +65,13 @@ pub extern "C" fn ffi_StorePath_clone(self_: &StorePath) -> StorePath {
}
#[no_mangle]
+pub extern "C" fn ffi_StorePath_clone_to(self_: &StorePath, other: *mut StorePath) {
+ unsafe {
+ core::ptr::write(other, self_.clone());
+ }
+}
+
+#[no_mangle]
pub extern "C" fn ffi_StorePath_name(self_: &StorePath) -> &str {
self_.name.name()
}