add csharp_generate_const option

This commit is contained in:
neuecc 2023-08-15 21:18:30 +09:00
parent 511053bb5c
commit 6e5a623352
17 changed files with 830 additions and 728 deletions

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ use super::lz4;
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_versionNumber( pub unsafe extern "C" fn csbindgen_LZ4_versionNumber(
) -> c_int ) -> c_int
{ {
lz4::LZ4_versionNumber( lz4::LZ4_versionNumber(
@ -18,7 +18,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_versionNumber(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_versionString( pub unsafe extern "C" fn csbindgen_LZ4_versionString(
) -> *const c_char ) -> *const c_char
{ {
lz4::LZ4_versionString( lz4::LZ4_versionString(
@ -31,7 +31,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_default(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int dstCapacity: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_default( lz4::LZ4_compress_default(
@ -47,7 +47,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
compressedSize: c_int, compressedSize: c_int,
dstCapacity: c_int dstCapacity: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_safe( lz4::LZ4_decompress_safe(
@ -60,7 +60,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_compressBound( pub unsafe extern "C" fn csbindgen_LZ4_compressBound(
inputSize: c_int inputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressBound( lz4::LZ4_compressBound(
@ -74,7 +74,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_fast(
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int, dstCapacity: c_int,
acceleration: c_int acceleration: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_fast( lz4::LZ4_compress_fast(
@ -88,7 +88,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_fast(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_sizeofState( pub unsafe extern "C" fn csbindgen_LZ4_sizeofState(
) -> c_int ) -> c_int
{ {
lz4::LZ4_sizeofState( lz4::LZ4_sizeofState(
@ -103,7 +103,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_fast_extState(
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int, dstCapacity: c_int,
acceleration: c_int acceleration: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_fast_extState( lz4::LZ4_compress_fast_extState(
@ -121,7 +121,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_destSize(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
srcSizePtr: *mut c_int, srcSizePtr: *mut c_int,
targetDstSize: c_int targetDstSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_destSize( lz4::LZ4_compress_destSize(
@ -138,7 +138,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_partial(
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
targetOutputSize: c_int, targetOutputSize: c_int,
dstCapacity: c_int dstCapacity: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_safe_partial( lz4::LZ4_decompress_safe_partial(
@ -152,7 +152,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_partial(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_createStream( pub unsafe extern "C" fn csbindgen_LZ4_createStream(
) -> *mut lz4::LZ4_stream_t ) -> *mut lz4::LZ4_stream_t
{ {
lz4::LZ4_createStream( lz4::LZ4_createStream(
@ -162,7 +162,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_createStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_freeStream( pub unsafe extern "C" fn csbindgen_LZ4_freeStream(
streamPtr: *mut lz4::LZ4_stream_t streamPtr: *mut lz4::LZ4_stream_t
) -> c_int ) -> c_int
{ {
lz4::LZ4_freeStream( lz4::LZ4_freeStream(
@ -172,7 +172,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_freeStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_resetStream_fast( pub unsafe extern "C" fn csbindgen_LZ4_resetStream_fast(
streamPtr: *mut lz4::LZ4_stream_t streamPtr: *mut lz4::LZ4_stream_t
) )
{ {
lz4::LZ4_resetStream_fast( lz4::LZ4_resetStream_fast(
@ -184,7 +184,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_resetStream_fast(
pub unsafe extern "C" fn csbindgen_LZ4_loadDict( pub unsafe extern "C" fn csbindgen_LZ4_loadDict(
streamPtr: *mut lz4::LZ4_stream_t, streamPtr: *mut lz4::LZ4_stream_t,
dictionary: *const c_char, dictionary: *const c_char,
dictSize: c_int dictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_loadDict( lz4::LZ4_loadDict(
@ -201,7 +201,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_fast_continue(
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int, dstCapacity: c_int,
acceleration: c_int acceleration: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_fast_continue( lz4::LZ4_compress_fast_continue(
@ -218,7 +218,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_fast_continue(
pub unsafe extern "C" fn csbindgen_LZ4_saveDict( pub unsafe extern "C" fn csbindgen_LZ4_saveDict(
streamPtr: *mut lz4::LZ4_stream_t, streamPtr: *mut lz4::LZ4_stream_t,
safeBuffer: *mut c_char, safeBuffer: *mut c_char,
maxDictSize: c_int maxDictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_saveDict( lz4::LZ4_saveDict(
@ -230,7 +230,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_saveDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_createStreamDecode( pub unsafe extern "C" fn csbindgen_LZ4_createStreamDecode(
) -> *mut lz4::LZ4_streamDecode_t ) -> *mut lz4::LZ4_streamDecode_t
{ {
lz4::LZ4_createStreamDecode( lz4::LZ4_createStreamDecode(
@ -240,7 +240,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_createStreamDecode(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_freeStreamDecode( pub unsafe extern "C" fn csbindgen_LZ4_freeStreamDecode(
LZ4_stream: *mut lz4::LZ4_streamDecode_t LZ4_stream: *mut lz4::LZ4_streamDecode_t
) -> c_int ) -> c_int
{ {
lz4::LZ4_freeStreamDecode( lz4::LZ4_freeStreamDecode(
@ -252,7 +252,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_freeStreamDecode(
pub unsafe extern "C" fn csbindgen_LZ4_setStreamDecode( pub unsafe extern "C" fn csbindgen_LZ4_setStreamDecode(
LZ4_streamDecode: *mut lz4::LZ4_streamDecode_t, LZ4_streamDecode: *mut lz4::LZ4_streamDecode_t,
dictionary: *const c_char, dictionary: *const c_char,
dictSize: c_int dictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_setStreamDecode( lz4::LZ4_setStreamDecode(
@ -264,7 +264,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_setStreamDecode(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_decoderRingBufferSize( pub unsafe extern "C" fn csbindgen_LZ4_decoderRingBufferSize(
maxBlockSize: c_int maxBlockSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decoderRingBufferSize( lz4::LZ4_decoderRingBufferSize(
@ -278,7 +278,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_continue(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int dstCapacity: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_safe_continue( lz4::LZ4_decompress_safe_continue(
@ -297,7 +297,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_usingDict(
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int, dstCapacity: c_int,
dictStart: *const c_char, dictStart: *const c_char,
dictSize: c_int dictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_safe_usingDict( lz4::LZ4_decompress_safe_usingDict(
@ -318,7 +318,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_partial_usingDict(
targetOutputSize: c_int, targetOutputSize: c_int,
maxOutputSize: c_int, maxOutputSize: c_int,
dictStart: *const c_char, dictStart: *const c_char,
dictSize: c_int dictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_safe_partial_usingDict( lz4::LZ4_decompress_safe_partial_usingDict(
@ -335,7 +335,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_partial_usingDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_initStream( pub unsafe extern "C" fn csbindgen_LZ4_initStream(
buffer: *mut c_void, buffer: *mut c_void,
size: usize size: usize
) -> *mut lz4::LZ4_stream_t ) -> *mut lz4::LZ4_stream_t
{ {
lz4::LZ4_initStream( lz4::LZ4_initStream(
@ -348,7 +348,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_initStream(
pub unsafe extern "C" fn csbindgen_LZ4_compress( pub unsafe extern "C" fn csbindgen_LZ4_compress(
src: *const c_char, src: *const c_char,
dest: *mut c_char, dest: *mut c_char,
srcSize: c_int srcSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress( lz4::LZ4_compress(
@ -363,7 +363,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_limitedOutput(
src: *const c_char, src: *const c_char,
dest: *mut c_char, dest: *mut c_char,
srcSize: c_int, srcSize: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_limitedOutput( lz4::LZ4_compress_limitedOutput(
@ -379,7 +379,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_withState(
state: *mut c_void, state: *mut c_void,
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int inputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_withState( lz4::LZ4_compress_withState(
@ -396,7 +396,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_limitedOutput_withState(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_limitedOutput_withState( lz4::LZ4_compress_limitedOutput_withState(
@ -413,7 +413,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_continue(
LZ4_streamPtr: *mut lz4::LZ4_stream_t, LZ4_streamPtr: *mut lz4::LZ4_stream_t,
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int inputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_continue( lz4::LZ4_compress_continue(
@ -430,7 +430,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_limitedOutput_continue(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_limitedOutput_continue( lz4::LZ4_compress_limitedOutput_continue(
@ -446,7 +446,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_limitedOutput_continue(
pub unsafe extern "C" fn csbindgen_LZ4_uncompress( pub unsafe extern "C" fn csbindgen_LZ4_uncompress(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
outputSize: c_int outputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_uncompress( lz4::LZ4_uncompress(
@ -461,7 +461,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_uncompress_unknownOutputSize(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
isize_: c_int, isize_: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_uncompress_unknownOutputSize( lz4::LZ4_uncompress_unknownOutputSize(
@ -474,7 +474,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_uncompress_unknownOutputSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_create( pub unsafe extern "C" fn csbindgen_LZ4_create(
inputBuffer: *mut c_char inputBuffer: *mut c_char
) -> *mut c_void ) -> *mut c_void
{ {
lz4::LZ4_create( lz4::LZ4_create(
@ -484,7 +484,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_create(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_sizeofStreamState( pub unsafe extern "C" fn csbindgen_LZ4_sizeofStreamState(
) -> c_int ) -> c_int
{ {
lz4::LZ4_sizeofStreamState( lz4::LZ4_sizeofStreamState(
@ -495,7 +495,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_sizeofStreamState(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_resetStreamState( pub unsafe extern "C" fn csbindgen_LZ4_resetStreamState(
state: *mut c_void, state: *mut c_void,
inputBuffer: *mut c_char inputBuffer: *mut c_char
) -> c_int ) -> c_int
{ {
lz4::LZ4_resetStreamState( lz4::LZ4_resetStreamState(
@ -506,7 +506,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_resetStreamState(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_slideInputBuffer( pub unsafe extern "C" fn csbindgen_LZ4_slideInputBuffer(
state: *mut c_void state: *mut c_void
) -> *mut c_char ) -> *mut c_char
{ {
lz4::LZ4_slideInputBuffer( lz4::LZ4_slideInputBuffer(
@ -519,7 +519,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_withPrefix64k(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
compressedSize: c_int, compressedSize: c_int,
maxDstSize: c_int maxDstSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_safe_withPrefix64k( lz4::LZ4_decompress_safe_withPrefix64k(
@ -534,7 +534,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_safe_withPrefix64k(
pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast_withPrefix64k( pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast_withPrefix64k(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
originalSize: c_int originalSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_fast_withPrefix64k( lz4::LZ4_decompress_fast_withPrefix64k(
@ -548,7 +548,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast_withPrefix64k(
pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast( pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
originalSize: c_int originalSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_fast( lz4::LZ4_decompress_fast(
@ -563,7 +563,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast_continue(
LZ4_streamDecode: *mut lz4::LZ4_streamDecode_t, LZ4_streamDecode: *mut lz4::LZ4_streamDecode_t,
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
originalSize: c_int originalSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_fast_continue( lz4::LZ4_decompress_fast_continue(
@ -580,7 +580,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast_usingDict(
dst: *mut c_char, dst: *mut c_char,
originalSize: c_int, originalSize: c_int,
dictStart: *const c_char, dictStart: *const c_char,
dictSize: c_int dictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_decompress_fast_usingDict( lz4::LZ4_decompress_fast_usingDict(
@ -594,7 +594,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_decompress_fast_usingDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_resetStream( pub unsafe extern "C" fn csbindgen_LZ4_resetStream(
streamPtr: *mut lz4::LZ4_stream_t streamPtr: *mut lz4::LZ4_stream_t
) )
{ {
lz4::LZ4_resetStream( lz4::LZ4_resetStream(
@ -608,7 +608,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC(
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
dstCapacity: c_int, dstCapacity: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_HC( lz4::LZ4_compress_HC(
@ -622,7 +622,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_sizeofStateHC( pub unsafe extern "C" fn csbindgen_LZ4_sizeofStateHC(
) -> c_int ) -> c_int
{ {
lz4::LZ4_sizeofStateHC( lz4::LZ4_sizeofStateHC(
@ -637,7 +637,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC_extStateHC(
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
maxDstSize: c_int, maxDstSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_HC_extStateHC( lz4::LZ4_compress_HC_extStateHC(
@ -657,7 +657,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC_destSize(
dst: *mut c_char, dst: *mut c_char,
srcSizePtr: *mut c_int, srcSizePtr: *mut c_int,
targetDstSize: c_int, targetDstSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_HC_destSize( lz4::LZ4_compress_HC_destSize(
@ -672,7 +672,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC_destSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_createStreamHC( pub unsafe extern "C" fn csbindgen_LZ4_createStreamHC(
) -> *mut lz4::LZ4_streamHC_t ) -> *mut lz4::LZ4_streamHC_t
{ {
lz4::LZ4_createStreamHC( lz4::LZ4_createStreamHC(
@ -682,7 +682,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_createStreamHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_freeStreamHC( pub unsafe extern "C" fn csbindgen_LZ4_freeStreamHC(
streamHCPtr: *mut lz4::LZ4_streamHC_t streamHCPtr: *mut lz4::LZ4_streamHC_t
) -> c_int ) -> c_int
{ {
lz4::LZ4_freeStreamHC( lz4::LZ4_freeStreamHC(
@ -693,7 +693,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_freeStreamHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_resetStreamHC_fast( pub unsafe extern "C" fn csbindgen_LZ4_resetStreamHC_fast(
streamHCPtr: *mut lz4::LZ4_streamHC_t, streamHCPtr: *mut lz4::LZ4_streamHC_t,
compressionLevel: c_int compressionLevel: c_int
) )
{ {
lz4::LZ4_resetStreamHC_fast( lz4::LZ4_resetStreamHC_fast(
@ -706,7 +706,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_resetStreamHC_fast(
pub unsafe extern "C" fn csbindgen_LZ4_loadDictHC( pub unsafe extern "C" fn csbindgen_LZ4_loadDictHC(
streamHCPtr: *mut lz4::LZ4_streamHC_t, streamHCPtr: *mut lz4::LZ4_streamHC_t,
dictionary: *const c_char, dictionary: *const c_char,
dictSize: c_int dictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_loadDictHC( lz4::LZ4_loadDictHC(
@ -722,7 +722,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC_continue(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
srcSize: c_int, srcSize: c_int,
maxDstSize: c_int maxDstSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_HC_continue( lz4::LZ4_compress_HC_continue(
@ -740,7 +740,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC_continue_destSize(
src: *const c_char, src: *const c_char,
dst: *mut c_char, dst: *mut c_char,
srcSizePtr: *mut c_int, srcSizePtr: *mut c_int,
targetDstSize: c_int targetDstSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compress_HC_continue_destSize( lz4::LZ4_compress_HC_continue_destSize(
@ -756,7 +756,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compress_HC_continue_destSize(
pub unsafe extern "C" fn csbindgen_LZ4_saveDictHC( pub unsafe extern "C" fn csbindgen_LZ4_saveDictHC(
streamHCPtr: *mut lz4::LZ4_streamHC_t, streamHCPtr: *mut lz4::LZ4_streamHC_t,
safeBuffer: *mut c_char, safeBuffer: *mut c_char,
maxDictSize: c_int maxDictSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_saveDictHC( lz4::LZ4_saveDictHC(
@ -769,7 +769,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_saveDictHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_initStreamHC( pub unsafe extern "C" fn csbindgen_LZ4_initStreamHC(
buffer: *mut c_void, buffer: *mut c_void,
size: usize size: usize
) -> *mut lz4::LZ4_streamHC_t ) -> *mut lz4::LZ4_streamHC_t
{ {
lz4::LZ4_initStreamHC( lz4::LZ4_initStreamHC(
@ -782,7 +782,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_initStreamHC(
pub unsafe extern "C" fn csbindgen_LZ4_compressHC( pub unsafe extern "C" fn csbindgen_LZ4_compressHC(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int inputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC( lz4::LZ4_compressHC(
@ -797,7 +797,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC_limitedOutput(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC_limitedOutput( lz4::LZ4_compressHC_limitedOutput(
@ -813,7 +813,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC2( lz4::LZ4_compressHC2(
@ -830,7 +830,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2_limitedOutput(
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int, maxOutputSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC2_limitedOutput( lz4::LZ4_compressHC2_limitedOutput(
@ -847,7 +847,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC_withStateHC(
state: *mut c_void, state: *mut c_void,
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int inputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC_withStateHC( lz4::LZ4_compressHC_withStateHC(
@ -864,7 +864,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC_limitedOutput_withStateHC(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC_limitedOutput_withStateHC( lz4::LZ4_compressHC_limitedOutput_withStateHC(
@ -882,7 +882,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2_withStateHC(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC2_withStateHC( lz4::LZ4_compressHC2_withStateHC(
@ -901,7 +901,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2_limitedOutput_withStateHC(
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int, maxOutputSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC2_limitedOutput_withStateHC( lz4::LZ4_compressHC2_limitedOutput_withStateHC(
@ -919,7 +919,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC_continue(
LZ4_streamHCPtr: *mut lz4::LZ4_streamHC_t, LZ4_streamHCPtr: *mut lz4::LZ4_streamHC_t,
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int inputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC_continue( lz4::LZ4_compressHC_continue(
@ -936,7 +936,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC_limitedOutput_continue(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int maxOutputSize: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC_limitedOutput_continue( lz4::LZ4_compressHC_limitedOutput_continue(
@ -950,7 +950,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC_limitedOutput_continue(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_createHC( pub unsafe extern "C" fn csbindgen_LZ4_createHC(
inputBuffer: *const c_char inputBuffer: *const c_char
) -> *mut c_void ) -> *mut c_void
{ {
lz4::LZ4_createHC( lz4::LZ4_createHC(
@ -960,7 +960,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_createHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_freeHC( pub unsafe extern "C" fn csbindgen_LZ4_freeHC(
LZ4HC_Data: *mut c_void LZ4HC_Data: *mut c_void
) -> c_int ) -> c_int
{ {
lz4::LZ4_freeHC( lz4::LZ4_freeHC(
@ -970,7 +970,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_freeHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_slideInputBufferHC( pub unsafe extern "C" fn csbindgen_LZ4_slideInputBufferHC(
LZ4HC_Data: *mut c_void LZ4HC_Data: *mut c_void
) -> *mut c_char ) -> *mut c_char
{ {
lz4::LZ4_slideInputBufferHC( lz4::LZ4_slideInputBufferHC(
@ -984,7 +984,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2_continue(
source: *const c_char, source: *const c_char,
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC2_continue( lz4::LZ4_compressHC2_continue(
@ -1003,7 +1003,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2_limitedOutput_continue(
dest: *mut c_char, dest: *mut c_char,
inputSize: c_int, inputSize: c_int,
maxOutputSize: c_int, maxOutputSize: c_int,
compressionLevel: c_int compressionLevel: c_int
) -> c_int ) -> c_int
{ {
lz4::LZ4_compressHC2_limitedOutput_continue( lz4::LZ4_compressHC2_limitedOutput_continue(
@ -1018,7 +1018,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_compressHC2_limitedOutput_continue(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_sizeofStreamStateHC( pub unsafe extern "C" fn csbindgen_LZ4_sizeofStreamStateHC(
) -> c_int ) -> c_int
{ {
lz4::LZ4_sizeofStreamStateHC( lz4::LZ4_sizeofStreamStateHC(
@ -1029,7 +1029,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_sizeofStreamStateHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_resetStreamStateHC( pub unsafe extern "C" fn csbindgen_LZ4_resetStreamStateHC(
state: *mut c_void, state: *mut c_void,
inputBuffer: *mut c_char inputBuffer: *mut c_char
) -> c_int ) -> c_int
{ {
lz4::LZ4_resetStreamStateHC( lz4::LZ4_resetStreamStateHC(
@ -1041,7 +1041,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_resetStreamStateHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4_resetStreamHC( pub unsafe extern "C" fn csbindgen_LZ4_resetStreamHC(
streamHCPtr: *mut lz4::LZ4_streamHC_t, streamHCPtr: *mut lz4::LZ4_streamHC_t,
compressionLevel: c_int compressionLevel: c_int
) )
{ {
lz4::LZ4_resetStreamHC( lz4::LZ4_resetStreamHC(
@ -1052,7 +1052,7 @@ pub unsafe extern "C" fn csbindgen_LZ4_resetStreamHC(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_isError( pub unsafe extern "C" fn csbindgen_LZ4F_isError(
code: lz4::LZ4F_errorCode_t code: lz4::LZ4F_errorCode_t
) -> c_uint ) -> c_uint
{ {
lz4::LZ4F_isError( lz4::LZ4F_isError(
@ -1062,7 +1062,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_isError(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_getErrorName( pub unsafe extern "C" fn csbindgen_LZ4F_getErrorName(
code: lz4::LZ4F_errorCode_t code: lz4::LZ4F_errorCode_t
) -> *const c_char ) -> *const c_char
{ {
lz4::LZ4F_getErrorName( lz4::LZ4F_getErrorName(
@ -1072,7 +1072,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_getErrorName(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_compressionLevel_max( pub unsafe extern "C" fn csbindgen_LZ4F_compressionLevel_max(
) -> c_int ) -> c_int
{ {
lz4::LZ4F_compressionLevel_max( lz4::LZ4F_compressionLevel_max(
@ -1083,7 +1083,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressionLevel_max(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_compressFrameBound( pub unsafe extern "C" fn csbindgen_LZ4F_compressFrameBound(
srcSize: usize, srcSize: usize,
preferencesPtr: *const lz4::LZ4F_preferences_t preferencesPtr: *const lz4::LZ4F_preferences_t
) -> usize ) -> usize
{ {
lz4::LZ4F_compressFrameBound( lz4::LZ4F_compressFrameBound(
@ -1098,7 +1098,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressFrame(
dstCapacity: usize, dstCapacity: usize,
srcBuffer: *const c_void, srcBuffer: *const c_void,
srcSize: usize, srcSize: usize,
preferencesPtr: *const lz4::LZ4F_preferences_t preferencesPtr: *const lz4::LZ4F_preferences_t
) -> usize ) -> usize
{ {
lz4::LZ4F_compressFrame( lz4::LZ4F_compressFrame(
@ -1112,7 +1112,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressFrame(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_getVersion( pub unsafe extern "C" fn csbindgen_LZ4F_getVersion(
) -> c_uint ) -> c_uint
{ {
lz4::LZ4F_getVersion( lz4::LZ4F_getVersion(
@ -1123,7 +1123,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_getVersion(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_createCompressionContext( pub unsafe extern "C" fn csbindgen_LZ4F_createCompressionContext(
cctxPtr: *mut *mut lz4::LZ4F_cctx, cctxPtr: *mut *mut lz4::LZ4F_cctx,
version: c_uint version: c_uint
) -> lz4::LZ4F_errorCode_t ) -> lz4::LZ4F_errorCode_t
{ {
lz4::LZ4F_createCompressionContext( lz4::LZ4F_createCompressionContext(
@ -1134,7 +1134,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_createCompressionContext(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_freeCompressionContext( pub unsafe extern "C" fn csbindgen_LZ4F_freeCompressionContext(
cctx: *mut lz4::LZ4F_cctx cctx: *mut lz4::LZ4F_cctx
) -> lz4::LZ4F_errorCode_t ) -> lz4::LZ4F_errorCode_t
{ {
lz4::LZ4F_freeCompressionContext( lz4::LZ4F_freeCompressionContext(
@ -1147,7 +1147,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressBegin(
cctx: *mut lz4::LZ4F_cctx, cctx: *mut lz4::LZ4F_cctx,
dstBuffer: *mut c_void, dstBuffer: *mut c_void,
dstCapacity: usize, dstCapacity: usize,
prefsPtr: *const lz4::LZ4F_preferences_t prefsPtr: *const lz4::LZ4F_preferences_t
) -> usize ) -> usize
{ {
lz4::LZ4F_compressBegin( lz4::LZ4F_compressBegin(
@ -1161,7 +1161,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressBegin(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_compressBound( pub unsafe extern "C" fn csbindgen_LZ4F_compressBound(
srcSize: usize, srcSize: usize,
prefsPtr: *const lz4::LZ4F_preferences_t prefsPtr: *const lz4::LZ4F_preferences_t
) -> usize ) -> usize
{ {
lz4::LZ4F_compressBound( lz4::LZ4F_compressBound(
@ -1177,7 +1177,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressUpdate(
dstCapacity: usize, dstCapacity: usize,
srcBuffer: *const c_void, srcBuffer: *const c_void,
srcSize: usize, srcSize: usize,
cOptPtr: *const lz4::LZ4F_compressOptions_t cOptPtr: *const lz4::LZ4F_compressOptions_t
) -> usize ) -> usize
{ {
lz4::LZ4F_compressUpdate( lz4::LZ4F_compressUpdate(
@ -1195,7 +1195,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_flush(
cctx: *mut lz4::LZ4F_cctx, cctx: *mut lz4::LZ4F_cctx,
dstBuffer: *mut c_void, dstBuffer: *mut c_void,
dstCapacity: usize, dstCapacity: usize,
cOptPtr: *const lz4::LZ4F_compressOptions_t cOptPtr: *const lz4::LZ4F_compressOptions_t
) -> usize ) -> usize
{ {
lz4::LZ4F_flush( lz4::LZ4F_flush(
@ -1211,7 +1211,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressEnd(
cctx: *mut lz4::LZ4F_cctx, cctx: *mut lz4::LZ4F_cctx,
dstBuffer: *mut c_void, dstBuffer: *mut c_void,
dstCapacity: usize, dstCapacity: usize,
cOptPtr: *const lz4::LZ4F_compressOptions_t cOptPtr: *const lz4::LZ4F_compressOptions_t
) -> usize ) -> usize
{ {
lz4::LZ4F_compressEnd( lz4::LZ4F_compressEnd(
@ -1225,7 +1225,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_compressEnd(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_createDecompressionContext( pub unsafe extern "C" fn csbindgen_LZ4F_createDecompressionContext(
dctxPtr: *mut *mut lz4::LZ4F_dctx, dctxPtr: *mut *mut lz4::LZ4F_dctx,
version: c_uint version: c_uint
) -> lz4::LZ4F_errorCode_t ) -> lz4::LZ4F_errorCode_t
{ {
lz4::LZ4F_createDecompressionContext( lz4::LZ4F_createDecompressionContext(
@ -1236,7 +1236,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_createDecompressionContext(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_freeDecompressionContext( pub unsafe extern "C" fn csbindgen_LZ4F_freeDecompressionContext(
dctx: *mut lz4::LZ4F_dctx dctx: *mut lz4::LZ4F_dctx
) -> lz4::LZ4F_errorCode_t ) -> lz4::LZ4F_errorCode_t
{ {
lz4::LZ4F_freeDecompressionContext( lz4::LZ4F_freeDecompressionContext(
@ -1247,7 +1247,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_freeDecompressionContext(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_headerSize( pub unsafe extern "C" fn csbindgen_LZ4F_headerSize(
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> usize ) -> usize
{ {
lz4::LZ4F_headerSize( lz4::LZ4F_headerSize(
@ -1261,7 +1261,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_getFrameInfo(
dctx: *mut lz4::LZ4F_dctx, dctx: *mut lz4::LZ4F_dctx,
frameInfoPtr: *mut lz4::LZ4F_frameInfo_t, frameInfoPtr: *mut lz4::LZ4F_frameInfo_t,
srcBuffer: *const c_void, srcBuffer: *const c_void,
srcSizePtr: *mut usize srcSizePtr: *mut usize
) -> usize ) -> usize
{ {
lz4::LZ4F_getFrameInfo( lz4::LZ4F_getFrameInfo(
@ -1279,7 +1279,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_decompress(
dstSizePtr: *mut usize, dstSizePtr: *mut usize,
srcBuffer: *const c_void, srcBuffer: *const c_void,
srcSizePtr: *mut usize, srcSizePtr: *mut usize,
dOptPtr: *const lz4::LZ4F_decompressOptions_t dOptPtr: *const lz4::LZ4F_decompressOptions_t
) -> usize ) -> usize
{ {
lz4::LZ4F_decompress( lz4::LZ4F_decompress(
@ -1294,7 +1294,7 @@ pub unsafe extern "C" fn csbindgen_LZ4F_decompress(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_LZ4F_resetDecompressionContext( pub unsafe extern "C" fn csbindgen_LZ4F_resetDecompressionContext(
dctx: *mut lz4::LZ4F_dctx dctx: *mut lz4::LZ4F_dctx
) )
{ {
lz4::LZ4F_resetDecompressionContext( lz4::LZ4F_resetDecompressionContext(

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ use super::zstd::*;
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_versionNumber( pub unsafe extern "C" fn csbindgen_ZSTD_versionNumber(
) -> c_uint ) -> c_uint
{ {
ZSTD_versionNumber( ZSTD_versionNumber(
@ -18,7 +18,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_versionNumber(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_versionString( pub unsafe extern "C" fn csbindgen_ZSTD_versionString(
) -> *const c_char ) -> *const c_char
{ {
ZSTD_versionString( ZSTD_versionString(
@ -32,7 +32,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compress(
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
srcSize: usize, srcSize: usize,
compressionLevel: c_int compressionLevel: c_int
) -> usize ) -> usize
{ {
ZSTD_compress( ZSTD_compress(
@ -49,7 +49,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompress(
dst: *mut c_void, dst: *mut c_void,
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
compressedSize: usize compressedSize: usize
) -> usize ) -> usize
{ {
ZSTD_decompress( ZSTD_decompress(
@ -63,7 +63,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompress(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getFrameContentSize( pub unsafe extern "C" fn csbindgen_ZSTD_getFrameContentSize(
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> c_ulonglong ) -> c_ulonglong
{ {
ZSTD_getFrameContentSize( ZSTD_getFrameContentSize(
@ -75,7 +75,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getFrameContentSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getDecompressedSize( pub unsafe extern "C" fn csbindgen_ZSTD_getDecompressedSize(
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> c_ulonglong ) -> c_ulonglong
{ {
ZSTD_getDecompressedSize( ZSTD_getDecompressedSize(
@ -87,7 +87,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getDecompressedSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_findFrameCompressedSize( pub unsafe extern "C" fn csbindgen_ZSTD_findFrameCompressedSize(
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> usize ) -> usize
{ {
ZSTD_findFrameCompressedSize( ZSTD_findFrameCompressedSize(
@ -98,7 +98,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_findFrameCompressedSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_compressBound( pub unsafe extern "C" fn csbindgen_ZSTD_compressBound(
srcSize: usize srcSize: usize
) -> usize ) -> usize
{ {
ZSTD_compressBound( ZSTD_compressBound(
@ -108,7 +108,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compressBound(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_isError( pub unsafe extern "C" fn csbindgen_ZSTD_isError(
code: usize code: usize
) -> c_uint ) -> c_uint
{ {
ZSTD_isError( ZSTD_isError(
@ -118,7 +118,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_isError(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getErrorName( pub unsafe extern "C" fn csbindgen_ZSTD_getErrorName(
code: usize code: usize
) -> *const c_char ) -> *const c_char
{ {
ZSTD_getErrorName( ZSTD_getErrorName(
@ -128,7 +128,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getErrorName(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_minCLevel( pub unsafe extern "C" fn csbindgen_ZSTD_minCLevel(
) -> c_int ) -> c_int
{ {
ZSTD_minCLevel( ZSTD_minCLevel(
@ -138,7 +138,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_minCLevel(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_maxCLevel( pub unsafe extern "C" fn csbindgen_ZSTD_maxCLevel(
) -> c_int ) -> c_int
{ {
ZSTD_maxCLevel( ZSTD_maxCLevel(
@ -148,7 +148,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_maxCLevel(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_defaultCLevel( pub unsafe extern "C" fn csbindgen_ZSTD_defaultCLevel(
) -> c_int ) -> c_int
{ {
ZSTD_defaultCLevel( ZSTD_defaultCLevel(
@ -158,7 +158,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_defaultCLevel(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_createCCtx( pub unsafe extern "C" fn csbindgen_ZSTD_createCCtx(
) -> *mut ZSTD_CCtx ) -> *mut ZSTD_CCtx
{ {
ZSTD_createCCtx( ZSTD_createCCtx(
@ -168,7 +168,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_createCCtx(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_freeCCtx( pub unsafe extern "C" fn csbindgen_ZSTD_freeCCtx(
cctx: *mut ZSTD_CCtx cctx: *mut ZSTD_CCtx
) -> usize ) -> usize
{ {
ZSTD_freeCCtx( ZSTD_freeCCtx(
@ -183,7 +183,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compressCCtx(
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
srcSize: usize, srcSize: usize,
compressionLevel: c_int compressionLevel: c_int
) -> usize ) -> usize
{ {
ZSTD_compressCCtx( ZSTD_compressCCtx(
@ -198,7 +198,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compressCCtx(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_createDCtx( pub unsafe extern "C" fn csbindgen_ZSTD_createDCtx(
) -> *mut ZSTD_DCtx ) -> *mut ZSTD_DCtx
{ {
ZSTD_createDCtx( ZSTD_createDCtx(
@ -208,7 +208,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_createDCtx(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_freeDCtx( pub unsafe extern "C" fn csbindgen_ZSTD_freeDCtx(
dctx: *mut ZSTD_DCtx dctx: *mut ZSTD_DCtx
) -> usize ) -> usize
{ {
ZSTD_freeDCtx( ZSTD_freeDCtx(
@ -222,7 +222,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompressDCtx(
dst: *mut c_void, dst: *mut c_void,
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> usize ) -> usize
{ {
ZSTD_decompressDCtx( ZSTD_decompressDCtx(
@ -236,7 +236,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompressDCtx(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_cParam_getBounds( pub unsafe extern "C" fn csbindgen_ZSTD_cParam_getBounds(
cParam: ZSTD_cParameter cParam: ZSTD_cParameter
) -> ZSTD_bounds ) -> ZSTD_bounds
{ {
ZSTD_cParam_getBounds( ZSTD_cParam_getBounds(
@ -248,7 +248,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_cParam_getBounds(
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setParameter( pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setParameter(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
param: ZSTD_cParameter, param: ZSTD_cParameter,
value: c_int value: c_int
) -> usize ) -> usize
{ {
ZSTD_CCtx_setParameter( ZSTD_CCtx_setParameter(
@ -261,7 +261,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setParameter(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setPledgedSrcSize( pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setPledgedSrcSize(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
pledgedSrcSize: c_ulonglong pledgedSrcSize: c_ulonglong
) -> usize ) -> usize
{ {
ZSTD_CCtx_setPledgedSrcSize( ZSTD_CCtx_setPledgedSrcSize(
@ -273,7 +273,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setPledgedSrcSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_reset( pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_reset(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
reset: ZSTD_ResetDirective reset: ZSTD_ResetDirective
) -> usize ) -> usize
{ {
ZSTD_CCtx_reset( ZSTD_CCtx_reset(
@ -288,7 +288,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compress2(
dst: *mut c_void, dst: *mut c_void,
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> usize ) -> usize
{ {
ZSTD_compress2( ZSTD_compress2(
@ -302,7 +302,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compress2(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_dParam_getBounds( pub unsafe extern "C" fn csbindgen_ZSTD_dParam_getBounds(
dParam: ZSTD_dParameter dParam: ZSTD_dParameter
) -> ZSTD_bounds ) -> ZSTD_bounds
{ {
ZSTD_dParam_getBounds( ZSTD_dParam_getBounds(
@ -314,7 +314,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_dParam_getBounds(
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_setParameter( pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_setParameter(
dctx: *mut ZSTD_DCtx, dctx: *mut ZSTD_DCtx,
param: ZSTD_dParameter, param: ZSTD_dParameter,
value: c_int value: c_int
) -> usize ) -> usize
{ {
ZSTD_DCtx_setParameter( ZSTD_DCtx_setParameter(
@ -327,7 +327,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_setParameter(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_reset( pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_reset(
dctx: *mut ZSTD_DCtx, dctx: *mut ZSTD_DCtx,
reset: ZSTD_ResetDirective reset: ZSTD_ResetDirective
) -> usize ) -> usize
{ {
ZSTD_DCtx_reset( ZSTD_DCtx_reset(
@ -338,7 +338,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_reset(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_createCStream( pub unsafe extern "C" fn csbindgen_ZSTD_createCStream(
) -> *mut ZSTD_CStream ) -> *mut ZSTD_CStream
{ {
ZSTD_createCStream( ZSTD_createCStream(
@ -348,7 +348,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_createCStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_freeCStream( pub unsafe extern "C" fn csbindgen_ZSTD_freeCStream(
zcs: *mut ZSTD_CStream zcs: *mut ZSTD_CStream
) -> usize ) -> usize
{ {
ZSTD_freeCStream( ZSTD_freeCStream(
@ -361,7 +361,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compressStream2(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
output: *mut ZSTD_outBuffer, output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer, input: *mut ZSTD_inBuffer,
endOp: ZSTD_EndDirective endOp: ZSTD_EndDirective
) -> usize ) -> usize
{ {
ZSTD_compressStream2( ZSTD_compressStream2(
@ -374,7 +374,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compressStream2(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_CStreamInSize( pub unsafe extern "C" fn csbindgen_ZSTD_CStreamInSize(
) -> usize ) -> usize
{ {
ZSTD_CStreamInSize( ZSTD_CStreamInSize(
@ -384,7 +384,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CStreamInSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_CStreamOutSize( pub unsafe extern "C" fn csbindgen_ZSTD_CStreamOutSize(
) -> usize ) -> usize
{ {
ZSTD_CStreamOutSize( ZSTD_CStreamOutSize(
@ -395,7 +395,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CStreamOutSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_initCStream( pub unsafe extern "C" fn csbindgen_ZSTD_initCStream(
zcs: *mut ZSTD_CStream, zcs: *mut ZSTD_CStream,
compressionLevel: c_int compressionLevel: c_int
) -> usize ) -> usize
{ {
ZSTD_initCStream( ZSTD_initCStream(
@ -408,7 +408,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_initCStream(
pub unsafe extern "C" fn csbindgen_ZSTD_compressStream( pub unsafe extern "C" fn csbindgen_ZSTD_compressStream(
zcs: *mut ZSTD_CStream, zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer, output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer input: *mut ZSTD_inBuffer
) -> usize ) -> usize
{ {
ZSTD_compressStream( ZSTD_compressStream(
@ -421,7 +421,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compressStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_flushStream( pub unsafe extern "C" fn csbindgen_ZSTD_flushStream(
zcs: *mut ZSTD_CStream, zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer output: *mut ZSTD_outBuffer
) -> usize ) -> usize
{ {
ZSTD_flushStream( ZSTD_flushStream(
@ -433,7 +433,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_flushStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_endStream( pub unsafe extern "C" fn csbindgen_ZSTD_endStream(
zcs: *mut ZSTD_CStream, zcs: *mut ZSTD_CStream,
output: *mut ZSTD_outBuffer output: *mut ZSTD_outBuffer
) -> usize ) -> usize
{ {
ZSTD_endStream( ZSTD_endStream(
@ -444,7 +444,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_endStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_createDStream( pub unsafe extern "C" fn csbindgen_ZSTD_createDStream(
) -> *mut ZSTD_DStream ) -> *mut ZSTD_DStream
{ {
ZSTD_createDStream( ZSTD_createDStream(
@ -454,7 +454,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_createDStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_freeDStream( pub unsafe extern "C" fn csbindgen_ZSTD_freeDStream(
zds: *mut ZSTD_DStream zds: *mut ZSTD_DStream
) -> usize ) -> usize
{ {
ZSTD_freeDStream( ZSTD_freeDStream(
@ -464,7 +464,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_freeDStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_initDStream( pub unsafe extern "C" fn csbindgen_ZSTD_initDStream(
zds: *mut ZSTD_DStream zds: *mut ZSTD_DStream
) -> usize ) -> usize
{ {
ZSTD_initDStream( ZSTD_initDStream(
@ -476,7 +476,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_initDStream(
pub unsafe extern "C" fn csbindgen_ZSTD_decompressStream( pub unsafe extern "C" fn csbindgen_ZSTD_decompressStream(
zds: *mut ZSTD_DStream, zds: *mut ZSTD_DStream,
output: *mut ZSTD_outBuffer, output: *mut ZSTD_outBuffer,
input: *mut ZSTD_inBuffer input: *mut ZSTD_inBuffer
) -> usize ) -> usize
{ {
ZSTD_decompressStream( ZSTD_decompressStream(
@ -488,7 +488,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompressStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_DStreamInSize( pub unsafe extern "C" fn csbindgen_ZSTD_DStreamInSize(
) -> usize ) -> usize
{ {
ZSTD_DStreamInSize( ZSTD_DStreamInSize(
@ -498,7 +498,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_DStreamInSize(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_DStreamOutSize( pub unsafe extern "C" fn csbindgen_ZSTD_DStreamOutSize(
) -> usize ) -> usize
{ {
ZSTD_DStreamOutSize( ZSTD_DStreamOutSize(
@ -515,7 +515,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingDict(
srcSize: usize, srcSize: usize,
dict: *const c_void, dict: *const c_void,
dictSize: usize, dictSize: usize,
compressionLevel: c_int compressionLevel: c_int
) -> usize ) -> usize
{ {
ZSTD_compress_usingDict( ZSTD_compress_usingDict(
@ -538,7 +538,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDict(
src: *const c_void, src: *const c_void,
srcSize: usize, srcSize: usize,
dict: *const c_void, dict: *const c_void,
dictSize: usize dictSize: usize
) -> usize ) -> usize
{ {
ZSTD_decompress_usingDict( ZSTD_decompress_usingDict(
@ -556,7 +556,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDict(
pub unsafe extern "C" fn csbindgen_ZSTD_createCDict( pub unsafe extern "C" fn csbindgen_ZSTD_createCDict(
dictBuffer: *const c_void, dictBuffer: *const c_void,
dictSize: usize, dictSize: usize,
compressionLevel: c_int compressionLevel: c_int
) -> *mut ZSTD_CDict ) -> *mut ZSTD_CDict
{ {
ZSTD_createCDict( ZSTD_createCDict(
@ -568,7 +568,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_createCDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_freeCDict( pub unsafe extern "C" fn csbindgen_ZSTD_freeCDict(
CDict: *mut ZSTD_CDict CDict: *mut ZSTD_CDict
) -> usize ) -> usize
{ {
ZSTD_freeCDict( ZSTD_freeCDict(
@ -583,7 +583,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingCDict(
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
srcSize: usize, srcSize: usize,
cdict: *const ZSTD_CDict cdict: *const ZSTD_CDict
) -> usize ) -> usize
{ {
ZSTD_compress_usingCDict( ZSTD_compress_usingCDict(
@ -599,7 +599,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingCDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_createDDict( pub unsafe extern "C" fn csbindgen_ZSTD_createDDict(
dictBuffer: *const c_void, dictBuffer: *const c_void,
dictSize: usize dictSize: usize
) -> *mut ZSTD_DDict ) -> *mut ZSTD_DDict
{ {
ZSTD_createDDict( ZSTD_createDDict(
@ -610,7 +610,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_createDDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_freeDDict( pub unsafe extern "C" fn csbindgen_ZSTD_freeDDict(
ddict: *mut ZSTD_DDict ddict: *mut ZSTD_DDict
) -> usize ) -> usize
{ {
ZSTD_freeDDict( ZSTD_freeDDict(
@ -625,7 +625,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDDict(
dstCapacity: usize, dstCapacity: usize,
src: *const c_void, src: *const c_void,
srcSize: usize, srcSize: usize,
ddict: *const ZSTD_DDict ddict: *const ZSTD_DDict
) -> usize ) -> usize
{ {
ZSTD_decompress_usingDDict( ZSTD_decompress_usingDDict(
@ -641,7 +641,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDict( pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDict(
dict: *const c_void, dict: *const c_void,
dictSize: usize dictSize: usize
) -> c_uint ) -> c_uint
{ {
ZSTD_getDictID_fromDict( ZSTD_getDictID_fromDict(
@ -652,7 +652,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromCDict( pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromCDict(
cdict: *const ZSTD_CDict cdict: *const ZSTD_CDict
) -> c_uint ) -> c_uint
{ {
ZSTD_getDictID_fromCDict( ZSTD_getDictID_fromCDict(
@ -662,7 +662,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromCDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDDict( pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDDict(
ddict: *const ZSTD_DDict ddict: *const ZSTD_DDict
) -> c_uint ) -> c_uint
{ {
ZSTD_getDictID_fromDDict( ZSTD_getDictID_fromDDict(
@ -673,7 +673,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromFrame( pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromFrame(
src: *const c_void, src: *const c_void,
srcSize: usize srcSize: usize
) -> c_uint ) -> c_uint
{ {
ZSTD_getDictID_fromFrame( ZSTD_getDictID_fromFrame(
@ -686,7 +686,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromFrame(
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_loadDictionary( pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_loadDictionary(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
dict: *const c_void, dict: *const c_void,
dictSize: usize dictSize: usize
) -> usize ) -> usize
{ {
ZSTD_CCtx_loadDictionary( ZSTD_CCtx_loadDictionary(
@ -699,7 +699,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_loadDictionary(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refCDict( pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refCDict(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
cdict: *const ZSTD_CDict cdict: *const ZSTD_CDict
) -> usize ) -> usize
{ {
ZSTD_CCtx_refCDict( ZSTD_CCtx_refCDict(
@ -712,7 +712,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refCDict(
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refPrefix( pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refPrefix(
cctx: *mut ZSTD_CCtx, cctx: *mut ZSTD_CCtx,
prefix: *const c_void, prefix: *const c_void,
prefixSize: usize prefixSize: usize
) -> usize ) -> usize
{ {
ZSTD_CCtx_refPrefix( ZSTD_CCtx_refPrefix(
@ -726,7 +726,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refPrefix(
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_loadDictionary( pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_loadDictionary(
dctx: *mut ZSTD_DCtx, dctx: *mut ZSTD_DCtx,
dict: *const c_void, dict: *const c_void,
dictSize: usize dictSize: usize
) -> usize ) -> usize
{ {
ZSTD_DCtx_loadDictionary( ZSTD_DCtx_loadDictionary(
@ -739,7 +739,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_loadDictionary(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refDDict( pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refDDict(
dctx: *mut ZSTD_DCtx, dctx: *mut ZSTD_DCtx,
ddict: *const ZSTD_DDict ddict: *const ZSTD_DDict
) -> usize ) -> usize
{ {
ZSTD_DCtx_refDDict( ZSTD_DCtx_refDDict(
@ -752,7 +752,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refDDict(
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refPrefix( pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refPrefix(
dctx: *mut ZSTD_DCtx, dctx: *mut ZSTD_DCtx,
prefix: *const c_void, prefix: *const c_void,
prefixSize: usize prefixSize: usize
) -> usize ) -> usize
{ {
ZSTD_DCtx_refPrefix( ZSTD_DCtx_refPrefix(
@ -764,7 +764,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refPrefix(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CCtx( pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CCtx(
cctx: *const ZSTD_CCtx cctx: *const ZSTD_CCtx
) -> usize ) -> usize
{ {
ZSTD_sizeof_CCtx( ZSTD_sizeof_CCtx(
@ -774,7 +774,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CCtx(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DCtx( pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DCtx(
dctx: *const ZSTD_DCtx dctx: *const ZSTD_DCtx
) -> usize ) -> usize
{ {
ZSTD_sizeof_DCtx( ZSTD_sizeof_DCtx(
@ -784,7 +784,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DCtx(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CStream( pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CStream(
zcs: *const ZSTD_CStream zcs: *const ZSTD_CStream
) -> usize ) -> usize
{ {
ZSTD_sizeof_CStream( ZSTD_sizeof_CStream(
@ -794,7 +794,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DStream( pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DStream(
zds: *const ZSTD_DStream zds: *const ZSTD_DStream
) -> usize ) -> usize
{ {
ZSTD_sizeof_DStream( ZSTD_sizeof_DStream(
@ -804,7 +804,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DStream(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CDict( pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CDict(
cdict: *const ZSTD_CDict cdict: *const ZSTD_CDict
) -> usize ) -> usize
{ {
ZSTD_sizeof_CDict( ZSTD_sizeof_CDict(
@ -814,7 +814,7 @@ pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CDict(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DDict( pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DDict(
ddict: *const ZSTD_DDict ddict: *const ZSTD_DDict
) -> usize ) -> usize
{ {
ZSTD_sizeof_DDict( ZSTD_sizeof_DDict(

View File

@ -30,6 +30,7 @@ pub struct BindgenOptions {
pub csharp_if_dll_name: String, pub csharp_if_dll_name: String,
pub csharp_use_function_pointer: bool, pub csharp_use_function_pointer: bool,
pub csharp_imported_namespaces: Vec<String>, pub csharp_imported_namespaces: Vec<String>,
pub csharp_generate_const: bool,
} }
impl Default for Builder { impl Default for Builder {
@ -53,6 +54,7 @@ impl Default for Builder {
csharp_if_dll_name: "".to_string(), csharp_if_dll_name: "".to_string(),
csharp_use_function_pointer: true, csharp_use_function_pointer: true,
csharp_imported_namespaces: vec![], csharp_imported_namespaces: vec![],
csharp_generate_const: false,
}, },
} }
} }
@ -181,6 +183,12 @@ impl Builder {
self self
} }
/// conifure C# generate const, default is false
pub fn csharp_generate_const(mut self, csharp_generate_const: bool) -> Builder {
self.options.csharp_generate_const = csharp_generate_const;
self
}
pub fn generate_csharp_file<P: AsRef<Path>>( pub fn generate_csharp_file<P: AsRef<Path>>(
&self, &self,
csharp_output_path: P, csharp_output_path: P,

View File

@ -79,6 +79,7 @@ pub fn emit_csharp(
aliases: &AliasMap, aliases: &AliasMap,
structs: &Vec<RustStruct>, structs: &Vec<RustStruct>,
enums: &Vec<RustEnum>, enums: &Vec<RustEnum>,
consts: &Vec<RustConst>,
options: &BindgenOptions, options: &BindgenOptions,
) -> String { ) -> String {
// configure // configure
@ -290,6 +291,27 @@ pub fn emit_csharp(
enum_string.push('\n'); enum_string.push('\n');
} }
let mut const_string = String::new();
for item in consts {
let type_name = item.rust_type.to_csharp_string(
options,
aliases,
false,
&"".to_string(),
&"".to_string(),
);
const_string.push_str(
format!(
" public {} {} = {};",
type_name,
escape_name(item.const_name.as_str()),
item.value
)
.as_str(),
);
}
let mut imported_namespaces = String::new(); let mut imported_namespaces = String::new();
for name in &options.csharp_imported_namespaces { for name in &options.csharp_imported_namespaces {
imported_namespaces.push_str_ln(format!("using {name};").as_str()); imported_namespaces.push_str_ln(format!("using {name};").as_str());
@ -317,6 +339,7 @@ namespace {namespace}
{structs_string} {structs_string}
{enum_string} {enum_string}
{const_string}
}} }}
" "
); );

View File

@ -14,7 +14,7 @@ use emitter::*;
use field_map::FieldMap; use field_map::FieldMap;
use parser::*; use parser::*;
use std::{collections::HashSet, error::Error}; use std::{collections::HashSet, error::Error};
use type_meta::{ExternMethod, RustEnum, RustStruct, RustType}; use type_meta::{ExternMethod, RustEnum, RustStruct, RustType, RustConst};
enum GenerateKind { enum GenerateKind {
InputBindgen, InputBindgen,
@ -34,6 +34,7 @@ pub(crate) fn generate(
let mut aliases = AliasMap::new(); let mut aliases = AliasMap::new();
let mut structs: Vec<RustStruct> = vec![]; let mut structs: Vec<RustStruct> = vec![];
let mut enums: Vec<RustEnum> = vec![]; let mut enums: Vec<RustEnum> = vec![];
let mut consts: Vec<RustConst> = vec![];
for path in paths { for path in paths {
let file_content = std::fs::read_to_string(path) let file_content = std::fs::read_to_string(path)
@ -47,6 +48,10 @@ pub(crate) fn generate(
collect_type_alias(&file_ast, &mut aliases); collect_type_alias(&file_ast, &mut aliases);
collect_struct(&file_ast, &mut structs); collect_struct(&file_ast, &mut structs);
collect_enum(&file_ast, &mut enums); collect_enum(&file_ast, &mut enums);
if options.csharp_generate_const {
collect_const(&file_ast, &mut consts);
}
} }
// collect using_types // collect using_types
@ -82,7 +87,7 @@ pub(crate) fn generate(
} else { } else {
None None
}; };
let csharp = emit_csharp(&methods, &aliases, &structs, &enums, options); let csharp = emit_csharp(&methods, &aliases, &structs, &enums, &consts, options);
Ok((rust, csharp)) Ok((rust, csharp))
} }

View File

@ -10,9 +10,9 @@ enum FnItem {
/// build a Vec of all Items, unless the Item is a Item::Mod, then append the Item contents of the vect /// build a Vec of all Items, unless the Item is a Item::Mod, then append the Item contents of the vect
/// Do this recursively. /// Do this recursively.
/// This is not memory-efficient, would work better with an iterator, but does not seem performance critical. /// This is not memory-efficient, would work better with an iterator, but does not seem performance critical.
fn depth_first_module_walk<'a>(ast: &'a Vec<Item>) -> Vec<&'a syn::Item>{ fn depth_first_module_walk<'a>(ast: &'a Vec<Item>) -> Vec<&'a syn::Item> {
let mut unwrapped_items : Vec<&syn::Item> = vec![]; let mut unwrapped_items: Vec<&syn::Item> = vec![];
for item in ast { for item in ast {
match item { match item {
Item::Mod(m) => match &m.content { Item::Mod(m) => match &m.content {
@ -26,7 +26,7 @@ fn depth_first_module_walk<'a>(ast: &'a Vec<Item>) -> Vec<&'a syn::Item>{
} }
} }
} }
unwrapped_items unwrapped_items
} }
@ -232,6 +232,49 @@ fn collect_fields_unnamed(fields: &syn::FieldsUnnamed) -> Vec<FieldMember> {
result result
} }
pub fn collect_const(ast: &syn::File, result: &mut Vec<RustConst>) {
for item in depth_first_module_walk(&ast.items) {
if let Item::Const(ct) = item {
// pub const Ident: ty = expr
let const_name = ct.ident.to_string();
let t = parse_type(&ct.ty);
if let syn::Expr::Lit(lit_expr) = &*ct.expr {
let value = match &lit_expr.lit {
syn::Lit::Str(s) => {
format!("{}", s.value())
}
syn::Lit::ByteStr(bs) => {
format!("{:?}", bs.value())
}
syn::Lit::Byte(b) => {
format!("{:?}", b.value())
}
syn::Lit::Char(c) => {
format!("'{}'", c.value())
}
syn::Lit::Int(i) => {
format!("{}", i.base10_parse::<i64>().unwrap())
}
syn::Lit::Float(f) => {
format!("{}", f.base10_parse::<f64>().unwrap())
}
syn::Lit::Bool(b) => {
format!("{}", b.value)
}
_ => format!(""),
};
result.push(RustConst {
const_name: const_name,
rust_type: t,
value: value,
});
}
}
}
}
pub fn collect_enum(ast: &syn::File, result: &mut Vec<RustEnum>) { pub fn collect_enum(ast: &syn::File, result: &mut Vec<RustEnum>) {
for item in depth_first_module_walk(&ast.items) { for item in depth_first_module_walk(&ast.items) {
if let Item::Enum(t) = item { if let Item::Enum(t) = item {

View File

@ -101,6 +101,13 @@ pub struct RustEnum {
pub is_flags: bool, pub is_flags: bool,
} }
#[derive(Clone, Debug)]
pub struct RustConst {
pub const_name: String,
pub rust_type: RustType,
pub value: String,
}
impl RustType { impl RustType {
pub fn to_rust_string(&self, type_path: &str) -> String { pub fn to_rust_string(&self, type_path: &str) -> String {
let mut sb = String::new(); let mut sb = String::new();

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace CsBindgen namespace CsBindgen
{ {
internal static unsafe partial class NativeMethods internal static unsafe partial class NativeMethods
@ -247,5 +248,6 @@ namespace CsBindgen
} }
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace CsBindgen namespace CsBindgen
{ {
internal static unsafe partial class NestedModuleTests internal static unsafe partial class NestedModuleTests
@ -40,5 +41,6 @@ namespace CsBindgen
} }
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace CsBindgen namespace CsBindgen
{ {
internal static unsafe partial class LibBullet3 internal static unsafe partial class LibBullet3
@ -1789,5 +1790,6 @@ namespace CsBindgen
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Physx namespace Physx
{ {
internal static unsafe partial class LibPhysx internal static unsafe partial class LibPhysx
@ -11267,5 +11268,6 @@ namespace Physx
} }
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace PixivApi.ImageFile namespace PixivApi.ImageFile
{ {
internal static unsafe partial class LibPng16 internal static unsafe partial class LibPng16
@ -1087,5 +1088,6 @@ namespace PixivApi.ImageFile
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace CsBindgen namespace CsBindgen
{ {
public static unsafe partial class LibLz4 public static unsafe partial class LibLz4
@ -450,5 +451,6 @@ namespace CsBindgen
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace CsBindgen namespace CsBindgen
{ {
internal static unsafe partial class LibQuiche internal static unsafe partial class LibQuiche
@ -558,5 +559,6 @@ namespace CsBindgen
} }

View File

@ -7,6 +7,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace CsBindgen namespace CsBindgen
{ {
internal static unsafe partial class LibZstd internal static unsafe partial class LibZstd
@ -306,5 +307,6 @@ namespace CsBindgen
} }