Skip to content

Commit

Permalink
frida-gum::interceptor: impl Clone for Listener (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajwerner authored Oct 8, 2024
1 parent eb36d5a commit 51936d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frida-gum/src/interceptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,10 @@ impl Drop for Listener {
unsafe { frida_gum_sys::g_object_unref(*ptr) }
}
}

impl Clone for Listener {
fn clone(&self) -> Self {
let Self(NativePointer(ptr)) = self;
Self(NativePointer(unsafe { frida_gum_sys::g_object_ref(*ptr) }))
}
}

0 comments on commit 51936d4

Please sign in to comment.