Use cxx_name instead of rust_name

This commit is contained in:
topjohnwu
2023-08-10 21:22:53 -07:00
parent 350d0d600c
commit b5b14ce343
2 changed files with 12 additions and 12 deletions

View File

@@ -23,12 +23,12 @@ pub mod ffi {
fn decompress(buf: &[u8], fd: i32) -> bool;
include!("bootimg.hpp");
#[rust_name = "BootImage"]
type boot_img;
#[rust_name = "payload"]
fn get_payload(self: &BootImage) -> &[u8];
#[rust_name = "tail"]
fn get_tail(self: &BootImage) -> &[u8];
#[cxx_name = "boot_img"]
type BootImage;
#[cxx_name = "get_payload"]
fn payload(self: &BootImage) -> &[u8];
#[cxx_name = "get_tail"]
fn tail(self: &BootImage) -> &[u8];
}
extern "Rust" {