Do not leak base::ffi to external crates

This commit is contained in:
topjohnwu
2025-09-10 10:09:31 -07:00
parent 48c62a1dae
commit 312bfe1bab
5 changed files with 6 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ pub use cstr::{
};
use cxx_extern::*;
pub use dir::*;
pub use ffi::fork_dont_care;
pub use ffi::{Utf8CStrRef, fork_dont_care};
pub use files::*;
pub use logging::*;
pub use misc::*;
@@ -27,7 +27,7 @@ mod result;
mod xwrap;
#[cxx::bridge]
pub mod ffi {
mod ffi {
#[derive(Copy, Clone)]
#[repr(i32)]
#[cxx_name = "LogLevel"]

View File

@@ -52,7 +52,7 @@ pub mod ffi {
include!("magiskboot.hpp");
#[cxx_name = "Utf8CStr"]
type Utf8CStrRef<'a> = base::ffi::Utf8CStrRef<'a>;
type Utf8CStrRef<'a> = base::Utf8CStrRef<'a>;
fn cleanup();
fn unpack(image: Utf8CStrRef, skip_decomp: bool, hdr: bool) -> i32;

View File

@@ -127,7 +127,7 @@ pub mod ffi {
unsafe extern "C++" {
#[cxx_name = "Utf8CStr"]
type Utf8CStrRef<'a> = base::ffi::Utf8CStrRef<'a>;
type Utf8CStrRef<'a> = base::Utf8CStrRef<'a>;
#[cxx_name = "ucred"]
type UCred = crate::UCred;

View File

@@ -50,7 +50,7 @@ pub mod ffi {
include!("init.hpp");
#[cxx_name = "Utf8CStr"]
type Utf8CStrRef<'a> = base::ffi::Utf8CStrRef<'a>;
type Utf8CStrRef<'a> = base::Utf8CStrRef<'a>;
unsafe fn magisk_proxy_main(argc: i32, argv: *mut *mut c_char) -> i32;
fn backup_init() -> Utf8CStrRef<'static>;

View File

@@ -31,7 +31,7 @@ pub mod ffi {
include!("../base/include/base.hpp");
#[cxx_name = "Utf8CStr"]
type Utf8CStrRef<'a> = base::ffi::Utf8CStrRef<'a>;
type Utf8CStrRef<'a> = base::Utf8CStrRef<'a>;
type sepol_impl;