From 3c88b11e5df33116580ac008e36092775df66135 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 13 Mar 2026 12:24:18 -0700 Subject: [WARP] Improved UX and API - Exposes WARP type objects directly - Adds processor API (for generating warp files directly) - Adds file and chunk API - Misc cleanup - Simplified the amount of commands - Replaced the "Create" commands with a purpose built processor dialog - Added a native QT viewer for WARP files - Simplified committing to a remote with a purpose built commit dialog --- rust/src/data_buffer.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rust/src/data_buffer.rs') diff --git a/rust/src/data_buffer.rs b/rust/src/data_buffer.rs index 79b3b20b..f8d71088 100644 --- a/rust/src/data_buffer.rs +++ b/rust/src/data_buffer.rs @@ -32,6 +32,13 @@ impl DataBuffer { self.0 } + /// Return the raw pointer to the underlying data buffer, to be freed later with `BNFreeDataBuffer`. + pub fn into_raw(self) -> *mut BNDataBuffer { + let ptr = self.0; + std::mem::forget(self); + ptr + } + pub fn new(data: &[u8]) -> Self { let buffer = unsafe { BNCreateDataBuffer(data.as_ptr() as *const c_void, data.len()) }; assert!(!buffer.is_null()); -- cgit v1.3.1