mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-27 15:20:58 +00:00
Do not leak base::ffi to external crates
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user