diff --git a/src/decode.rs b/src/decode.rs index 54a1757..72c3c24 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -31,7 +31,6 @@ use ::dictionary::{kBrotliDictionary, kBrotliDictionaryOffsetsByLength, kBrotliMinDictionaryWordLength}; pub use huffman::{HuffmanCode, HuffmanTreeGroup}; #[repr(C)] -#[no_mangle] #[derive(Debug)] pub enum BrotliResult { ResultSuccess = 1, diff --git a/src/ffi/interface.rs b/src/ffi/interface.rs index af01bbf..eefccac 100644 --- a/src/ffi/interface.rs +++ b/src/ffi/interface.rs @@ -5,7 +5,6 @@ pub enum c_void{ _Nothing = 0, } -#[no_mangle] #[repr(C)] #[allow(dead_code)] pub enum BrotliDecoderParameter { @@ -15,7 +14,6 @@ pub enum BrotliDecoderParameter { #[repr(C)] -#[no_mangle] pub enum BrotliDecoderResult { BROTLI_DECODER_RESULT_ERROR = 0, BROTLI_DECODER_RESULT_SUCCESS = 1, @@ -34,15 +32,12 @@ impl From for BrotliDecoderResult { } } } -#[no_mangle] pub type brotli_alloc_func = Option *mut c_void>; -#[no_mangle] pub type brotli_free_func = Option ()>; #[repr(C)] -#[no_mangle] #[derive(Clone)] pub struct CAllocator { pub alloc_func: brotli_alloc_func, diff --git a/src/ffi/mod.rs b/src/ffi/mod.rs index 460439e..73ae362 100644 --- a/src/ffi/mod.rs +++ b/src/ffi/mod.rs @@ -1,6 +1,5 @@ #![cfg(not(feature="safe"))] -#[no_mangle] #[cfg(feature="std")] use std::{thread,panic, io, boxed, any, string}; #[cfg(feature="std")] @@ -39,7 +38,6 @@ type BrotliAdditionalErrorData = boxed::Box; type BrotliAdditionalErrorData = (); #[repr(C)] -#[no_mangle] pub struct BrotliDecoderState { pub custom_allocator: CAllocator, pub decompressor: ::BrotliState(mut r: R, mut w: W) -> io::Result Ok(out_size) } -#[no_mangle] #[repr(C)] pub struct BrotliDecoderReturnInfo { pub decoded_size: usize, diff --git a/src/state.rs b/src/state.rs index 98ad790..e4ac242 100644 --- a/src/state.rs +++ b/src/state.rs @@ -19,7 +19,6 @@ pub enum WhichTreeGroup { } #[repr(C)] #[derive(Clone,Copy, Debug)] -#[no_mangle] pub enum BrotliDecoderErrorCode{ BROTLI_DECODER_NO_ERROR = 0, /* Same as BrotliDecoderResult values */