use crate::cpp::StdString;
opaque!(ReOxideInterface);
impl ReOxideInterface {
pub fn send_string(&mut self, s: &str) {
let std_str = StdString::from_str(s);
unsafe { ReOxideInterface_send_string(self, std_str.as_ref()) };
}
}
pub fn ghidra_throw(explain: &str) -> ! {
unsafe { ghidra_panic(explain.as_ptr(), explain.len()) }
}
#[link(name = "reoxide")]
unsafe extern "C-unwind" {
fn ReOxideInterface_send_string(this: *mut ReOxideInterface, s: *const StdString);
fn ghidra_panic(s: *const u8, len: usize) -> !;
}