@@ -96,7 +96,7 @@ pub type z_off_t = c_long;
96
96
/// }
97
97
/// ```
98
98
#[ export_name = prefix ! ( crc32) ]
99
- pub unsafe extern "C" fn crc32 ( crc : c_ulong , buf : * const Bytef , len : uInt ) -> c_ulong {
99
+ pub unsafe extern "C-unwind " fn crc32 ( crc : c_ulong , buf : * const Bytef , len : uInt ) -> c_ulong {
100
100
match unsafe { slice_from_raw_parts ( buf, len as usize ) } {
101
101
Some ( buf) => zlib_rs:: crc32 ( crc as u32 , buf) as c_ulong ,
102
102
None => 0 ,
@@ -131,7 +131,7 @@ pub unsafe extern "C" fn crc32(crc: c_ulong, buf: *const Bytef, len: uInt) -> c_
131
131
/// }
132
132
/// ```
133
133
#[ export_name = prefix ! ( crc32_combine) ]
134
- pub extern "C" fn crc32_combine ( crc1 : c_ulong , crc2 : c_ulong , len2 : z_off_t ) -> c_ulong {
134
+ pub extern "C-unwind " fn crc32_combine ( crc1 : c_ulong , crc2 : c_ulong , len2 : z_off_t ) -> c_ulong {
135
135
zlib_rs:: crc32_combine ( crc1 as u32 , crc2 as u32 , len2 as u64 ) as c_ulong
136
136
}
137
137
@@ -161,7 +161,7 @@ pub extern "C" fn crc32_combine(crc1: c_ulong, crc2: c_ulong, len2: z_off_t) ->
161
161
/// }
162
162
/// ```
163
163
#[ export_name = prefix ! ( adler32) ]
164
- pub unsafe extern "C" fn adler32 ( adler : c_ulong , buf : * const Bytef , len : uInt ) -> c_ulong {
164
+ pub unsafe extern "C-unwind " fn adler32 ( adler : c_ulong , buf : * const Bytef , len : uInt ) -> c_ulong {
165
165
match unsafe { slice_from_raw_parts ( buf, len as usize ) } {
166
166
Some ( buf) => zlib_rs:: adler32 ( adler as u32 , buf) as c_ulong ,
167
167
None => 1 ,
@@ -196,7 +196,11 @@ pub unsafe extern "C" fn adler32(adler: c_ulong, buf: *const Bytef, len: uInt) -
196
196
/// }
197
197
/// ```
198
198
#[ export_name = prefix ! ( adler32_combine) ]
199
- pub extern "C" fn adler32_combine ( adler1 : c_ulong , adler2 : c_ulong , len2 : z_off_t ) -> c_ulong {
199
+ pub extern "C-unwind" fn adler32_combine (
200
+ adler1 : c_ulong ,
201
+ adler2 : c_ulong ,
202
+ len2 : z_off_t ,
203
+ ) -> c_ulong {
200
204
match u64:: try_from ( len2) {
201
205
Ok ( len2) => zlib_rs:: adler32_combine ( adler1 as u32 , adler2 as u32 , len2) as c_ulong ,
202
206
Err ( _) => {
@@ -262,7 +266,7 @@ pub extern "C" fn adler32_combine(adler1: c_ulong, adler2: c_ulong, len2: z_off_
262
266
/// assert_eq!(dest, b"Ferris");
263
267
/// ```
264
268
#[ export_name = prefix ! ( uncompress) ]
265
- pub unsafe extern "C" fn uncompress (
269
+ pub unsafe extern "C-unwind " fn uncompress (
266
270
dest : * mut u8 ,
267
271
destLen : * mut c_ulong ,
268
272
source : * const u8 ,
@@ -311,7 +315,7 @@ pub unsafe extern "C" fn uncompress(
311
315
/// - `strm` is `NULL`
312
316
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
313
317
#[ export_name = prefix ! ( inflate) ]
314
- pub unsafe extern "C" fn inflate ( strm : * mut z_stream , flush : i32 ) -> i32 {
318
+ pub unsafe extern "C-unwind " fn inflate ( strm : * mut z_stream , flush : i32 ) -> i32 {
315
319
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
316
320
let flush = InflateFlush :: try_from ( flush) . unwrap_or_default ( ) ;
317
321
zlib_rs:: inflate:: inflate ( stream, flush) as _
@@ -335,7 +339,7 @@ pub unsafe extern "C" fn inflate(strm: *mut z_stream, flush: i32) -> i32 {
335
339
/// - `strm` is `NULL`
336
340
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
337
341
#[ export_name = prefix ! ( inflateEnd) ]
338
- pub unsafe extern "C" fn inflateEnd ( strm : * mut z_stream ) -> i32 {
342
+ pub unsafe extern "C-unwind " fn inflateEnd ( strm : * mut z_stream ) -> i32 {
339
343
match InflateStream :: from_stream_mut ( strm) {
340
344
Some ( stream) => {
341
345
zlib_rs:: inflate:: end ( stream) ;
@@ -369,7 +373,7 @@ pub unsafe extern "C" fn inflateEnd(strm: *mut z_stream) -> i32 {
369
373
/// - `zfree`
370
374
/// - `opaque`
371
375
#[ export_name = prefix ! ( inflateBackInit_) ]
372
- pub unsafe extern "C" fn inflateBackInit_ (
376
+ pub unsafe extern "C-unwind " fn inflateBackInit_ (
373
377
_strm : z_streamp ,
374
378
_windowBits : c_int ,
375
379
_window : * mut c_uchar ,
@@ -389,7 +393,7 @@ pub unsafe extern "C" fn inflateBackInit_(
389
393
/// - `strm` is `NULL`
390
394
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateBackInit_`]
391
395
#[ export_name = prefix ! ( inflateBack) ]
392
- pub unsafe extern "C" fn inflateBack (
396
+ pub unsafe extern "C-unwind " fn inflateBack (
393
397
_strm : z_streamp ,
394
398
_in : in_func ,
395
399
_in_desc : * mut c_void ,
@@ -416,7 +420,7 @@ pub unsafe extern "C" fn inflateBack(
416
420
/// - `strm` is `NULL`
417
421
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateBackInit_`]
418
422
#[ export_name = prefix ! ( inflateBackEnd) ]
419
- pub unsafe extern "C" fn inflateBackEnd ( _strm : z_streamp ) -> c_int {
423
+ pub unsafe extern "C-unwind " fn inflateBackEnd ( _strm : z_streamp ) -> c_int {
420
424
todo ! ( "inflateBack is not implemented yet" )
421
425
}
422
426
@@ -445,7 +449,7 @@ pub unsafe extern "C" fn inflateBackEnd(_strm: z_streamp) -> c_int {
445
449
/// - `source` is `NULL`
446
450
/// - `source` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
447
451
#[ export_name = prefix ! ( inflateCopy) ]
448
- pub unsafe extern "C" fn inflateCopy ( dest : * mut z_stream , source : * const z_stream ) -> i32 {
452
+ pub unsafe extern "C-unwind " fn inflateCopy ( dest : * mut z_stream , source : * const z_stream ) -> i32 {
449
453
let Some ( dest) = ( unsafe { dest. cast :: < MaybeUninit < InflateStream > > ( ) . as_mut ( ) } ) else {
450
454
return ReturnCode :: StreamError as _ ;
451
455
} ;
@@ -480,7 +484,7 @@ pub unsafe extern "C" fn inflateCopy(dest: *mut z_stream, source: *const z_strea
480
484
/// - `strm` is `NULL`
481
485
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
482
486
#[ export_name = prefix ! ( inflateMark) ]
483
- pub unsafe extern "C" fn inflateMark ( strm : * const z_stream ) -> c_long {
487
+ pub unsafe extern "C-unwind " fn inflateMark ( strm : * const z_stream ) -> c_long {
484
488
if let Some ( stream) = InflateStream :: from_stream_ref ( strm) {
485
489
zlib_rs:: inflate:: mark ( stream)
486
490
} else {
@@ -514,7 +518,7 @@ pub unsafe extern "C" fn inflateMark(strm: *const z_stream) -> c_long {
514
518
/// - `strm` is `NULL`
515
519
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
516
520
#[ export_name = prefix ! ( inflateSync) ]
517
- pub unsafe extern "C" fn inflateSync ( strm : * mut z_stream ) -> i32 {
521
+ pub unsafe extern "C-unwind " fn inflateSync ( strm : * mut z_stream ) -> i32 {
518
522
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
519
523
zlib_rs:: inflate:: sync ( stream) as _
520
524
} else {
@@ -531,7 +535,7 @@ pub unsafe extern "C" fn inflateSync(strm: *mut z_stream) -> i32 {
531
535
/// - `strm` is `NULL`
532
536
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
533
537
#[ export_name = prefix ! ( inflateSyncPoint) ]
534
- pub unsafe extern "C" fn inflateSyncPoint ( strm : * mut z_stream ) -> i32 {
538
+ pub unsafe extern "C-unwind " fn inflateSyncPoint ( strm : * mut z_stream ) -> i32 {
535
539
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
536
540
zlib_rs:: inflate:: sync_point ( stream) as i32
537
541
} else {
@@ -565,7 +569,7 @@ pub unsafe extern "C" fn inflateSyncPoint(strm: *mut z_stream) -> i32 {
565
569
/// - `zfree`
566
570
/// - `opaque`
567
571
#[ export_name = prefix ! ( inflateInit_) ]
568
- pub unsafe extern "C" fn inflateInit_ (
572
+ pub unsafe extern "C-unwind " fn inflateInit_ (
569
573
strm : z_streamp ,
570
574
version : * const c_char ,
571
575
stream_size : c_int ,
@@ -598,7 +602,7 @@ pub unsafe extern "C" fn inflateInit_(
598
602
/// - `zfree`
599
603
/// - `opaque`
600
604
#[ export_name = prefix ! ( inflateInit2_) ]
601
- pub unsafe extern "C" fn inflateInit2_ (
605
+ pub unsafe extern "C-unwind " fn inflateInit2_ (
602
606
strm : z_streamp ,
603
607
windowBits : c_int ,
604
608
version : * const c_char ,
@@ -624,7 +628,7 @@ pub unsafe extern "C" fn inflateInit2_(
624
628
/// - `zalloc`
625
629
/// - `zfree`
626
630
/// - `opaque`
627
- unsafe extern "C" fn inflateInit2 ( strm : z_streamp , windowBits : c_int ) -> c_int {
631
+ unsafe extern "C-unwind " fn inflateInit2 ( strm : z_streamp , windowBits : c_int ) -> c_int {
628
632
let Some ( strm) = ( unsafe { strm. as_mut ( ) } ) else {
629
633
return ReturnCode :: StreamError as _ ;
630
634
} ;
@@ -659,7 +663,7 @@ unsafe extern "C" fn inflateInit2(strm: z_streamp, windowBits: c_int) -> c_int {
659
663
/// - `strm` is `NULL`
660
664
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
661
665
#[ export_name = prefix ! ( inflatePrime) ]
662
- pub unsafe extern "C" fn inflatePrime ( strm : * mut z_stream , bits : i32 , value : i32 ) -> i32 {
666
+ pub unsafe extern "C-unwind " fn inflatePrime ( strm : * mut z_stream , bits : i32 , value : i32 ) -> i32 {
663
667
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
664
668
zlib_rs:: inflate:: prime ( stream, bits, value) as _
665
669
} else {
@@ -685,7 +689,7 @@ pub unsafe extern "C" fn inflatePrime(strm: *mut z_stream, bits: i32, value: i32
685
689
/// - `strm` is `NULL`
686
690
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
687
691
#[ export_name = prefix ! ( inflateReset) ]
688
- pub unsafe extern "C" fn inflateReset ( strm : * mut z_stream ) -> i32 {
692
+ pub unsafe extern "C-unwind " fn inflateReset ( strm : * mut z_stream ) -> i32 {
689
693
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
690
694
zlib_rs:: inflate:: reset ( stream) as _
691
695
} else {
@@ -712,7 +716,7 @@ pub unsafe extern "C" fn inflateReset(strm: *mut z_stream) -> i32 {
712
716
/// - `strm` is `NULL`
713
717
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
714
718
#[ export_name = prefix ! ( inflateReset2) ]
715
- pub unsafe extern "C" fn inflateReset2 ( strm : * mut z_stream , windowBits : c_int ) -> i32 {
719
+ pub unsafe extern "C-unwind " fn inflateReset2 ( strm : * mut z_stream , windowBits : c_int ) -> i32 {
716
720
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
717
721
let config = InflateConfig {
718
722
window_bits : windowBits,
@@ -751,7 +755,7 @@ pub unsafe extern "C" fn inflateReset2(strm: *mut z_stream, windowBits: c_int) -
751
755
/// - `dictionary` is `NULL`
752
756
/// - `dictionary` and `dictLength` satisfy the requirements of [`core::slice::from_raw_parts_mut::<u8>`]
753
757
#[ export_name = prefix ! ( inflateSetDictionary) ]
754
- pub unsafe extern "C" fn inflateSetDictionary (
758
+ pub unsafe extern "C-unwind " fn inflateSetDictionary (
755
759
strm : * mut z_stream ,
756
760
dictionary : * const u8 ,
757
761
dictLength : c_uint ,
@@ -809,7 +813,7 @@ pub unsafe extern "C" fn inflateSetDictionary(
809
813
/// - if `head.name` is not NULL, it must be writable for at least `head.name_max` bytes
810
814
/// - if `head.comment` is not NULL, it must be writable for at least `head.comm_max` bytes
811
815
#[ export_name = prefix ! ( inflateGetHeader) ]
812
- pub unsafe extern "C" fn inflateGetHeader ( strm : z_streamp , head : gz_headerp ) -> c_int {
816
+ pub unsafe extern "C-unwind " fn inflateGetHeader ( strm : z_streamp , head : gz_headerp ) -> c_int {
813
817
let Some ( stream) = ( unsafe { InflateStream :: from_stream_mut ( strm) } ) else {
814
818
return ReturnCode :: StreamError as _ ;
815
819
} ;
@@ -829,7 +833,7 @@ pub unsafe extern "C" fn inflateGetHeader(strm: z_streamp, head: gz_headerp) ->
829
833
/// - `strm` is `NULL`
830
834
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
831
835
#[ export_name = prefix ! ( inflateUndermine) ]
832
- pub unsafe extern "C" fn inflateUndermine ( strm : * mut z_stream , subvert : i32 ) -> c_int {
836
+ pub unsafe extern "C-unwind " fn inflateUndermine ( strm : * mut z_stream , subvert : i32 ) -> c_int {
833
837
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
834
838
zlib_rs:: inflate:: undermine ( stream, subvert) as i32
835
839
} else {
@@ -844,7 +848,7 @@ pub unsafe extern "C" fn inflateUndermine(strm: *mut z_stream, subvert: i32) ->
844
848
/// - `strm` is `NULL`
845
849
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`inflateInit_`] or similar
846
850
#[ export_name = prefix ! ( inflateResetKeep) ]
847
- pub unsafe extern "C" fn inflateResetKeep ( strm : * mut z_stream ) -> c_int {
851
+ pub unsafe extern "C-unwind " fn inflateResetKeep ( strm : * mut z_stream ) -> c_int {
848
852
if let Some ( stream) = InflateStream :: from_stream_mut ( strm) {
849
853
zlib_rs:: inflate:: reset_keep ( stream) as _
850
854
} else {
@@ -863,7 +867,7 @@ pub unsafe extern "C" fn inflateResetKeep(strm: *mut z_stream) -> c_int {
863
867
/// - `buf` is `NULL`
864
868
/// - `buf` and `len` satisfy the requirements of [`core::slice::from_raw_parts`]
865
869
#[ export_name = prefix ! ( inflateCodesUsed) ]
866
- pub unsafe extern "C" fn inflateCodesUsed ( _strm : * mut z_stream ) -> c_ulong {
870
+ pub unsafe extern "C-unwind " fn inflateCodesUsed ( _strm : * mut z_stream ) -> c_ulong {
867
871
todo ! ( )
868
872
}
869
873
@@ -884,7 +888,7 @@ pub unsafe extern "C" fn inflateCodesUsed(_strm: *mut z_stream) -> c_ulong {
884
888
/// - `strm` is `NULL`
885
889
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
886
890
#[ export_name = prefix ! ( deflate) ]
887
- pub unsafe extern "C" fn deflate ( strm : * mut z_stream , flush : i32 ) -> c_int {
891
+ pub unsafe extern "C-unwind " fn deflate ( strm : * mut z_stream , flush : i32 ) -> c_int {
888
892
if let Some ( stream) = DeflateStream :: from_stream_mut ( strm) {
889
893
match DeflateFlush :: try_from ( flush) {
890
894
Ok ( flush) => zlib_rs:: deflate:: deflate ( stream, flush) as _ ,
@@ -918,7 +922,7 @@ pub unsafe extern "C" fn deflate(strm: *mut z_stream, flush: i32) -> c_int {
918
922
/// - `head` is `NULL`
919
923
/// - `head` satisfies the requirements of `&mut *head`
920
924
#[ export_name = prefix ! ( deflateSetHeader) ]
921
- pub unsafe extern "C" fn deflateSetHeader ( strm : * mut z_stream , head : gz_headerp ) -> c_int {
925
+ pub unsafe extern "C-unwind " fn deflateSetHeader ( strm : * mut z_stream , head : gz_headerp ) -> c_int {
922
926
let Some ( stream) = ( unsafe { DeflateStream :: from_stream_mut ( strm) } ) else {
923
927
return ReturnCode :: StreamError as _ ;
924
928
} ;
@@ -944,7 +948,7 @@ pub unsafe extern "C" fn deflateSetHeader(strm: *mut z_stream, head: gz_headerp)
944
948
/// - `strm` is `NULL`
945
949
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
946
950
#[ export_name = prefix ! ( deflateBound) ]
947
- pub unsafe extern "C" fn deflateBound ( strm : * mut z_stream , sourceLen : c_ulong ) -> c_ulong {
951
+ pub unsafe extern "C-unwind " fn deflateBound ( strm : * mut z_stream , sourceLen : c_ulong ) -> c_ulong {
948
952
zlib_rs:: deflate:: bound ( DeflateStream :: from_stream_mut ( strm) , sourceLen as usize ) as c_ulong
949
953
}
950
954
@@ -1001,7 +1005,7 @@ pub unsafe extern "C" fn deflateBound(strm: *mut z_stream, sourceLen: c_ulong) -
1001
1005
/// assert_eq!(dest, [120, 156, 115, 75, 45, 42, 202, 44, 6, 0, 8, 6, 2, 108]);
1002
1006
/// ```
1003
1007
#[ export_name = prefix ! ( compress) ]
1004
- pub unsafe extern "C" fn compress (
1008
+ pub unsafe extern "C-unwind " fn compress (
1005
1009
dest : * mut Bytef ,
1006
1010
destLen : * mut c_ulong ,
1007
1011
source : * const Bytef ,
@@ -1044,7 +1048,7 @@ pub unsafe extern "C" fn compress(
1044
1048
/// - `source` is `NULL`
1045
1049
/// - `source` and `sourceLen` satisfy the requirements of [`core::slice::from_raw_parts`]
1046
1050
#[ export_name = prefix ! ( compress2) ]
1047
- pub unsafe extern "C" fn compress2 (
1051
+ pub unsafe extern "C-unwind " fn compress2 (
1048
1052
dest : * mut Bytef ,
1049
1053
destLen : * mut c_ulong ,
1050
1054
source : * const Bytef ,
@@ -1077,7 +1081,7 @@ pub unsafe extern "C" fn compress2(
1077
1081
///
1078
1082
/// Can be used before a [`compress`] or [`compress2`] call to allocate the destination buffer.
1079
1083
#[ export_name = prefix ! ( compressBound) ]
1080
- pub extern "C" fn compressBound ( sourceLen : c_ulong ) -> c_ulong {
1084
+ pub extern "C-unwind " fn compressBound ( sourceLen : c_ulong ) -> c_ulong {
1081
1085
zlib_rs:: deflate:: compress_bound ( sourceLen as usize ) as c_ulong
1082
1086
}
1083
1087
@@ -1099,7 +1103,7 @@ pub extern "C" fn compressBound(sourceLen: c_ulong) -> c_ulong {
1099
1103
/// - `strm` is `NULL`
1100
1104
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
1101
1105
#[ export_name = prefix ! ( deflateEnd) ]
1102
- pub unsafe extern "C" fn deflateEnd ( strm : * mut z_stream ) -> i32 {
1106
+ pub unsafe extern "C-unwind " fn deflateEnd ( strm : * mut z_stream ) -> i32 {
1103
1107
match DeflateStream :: from_stream_mut ( strm) {
1104
1108
Some ( stream) => match zlib_rs:: deflate:: end ( stream) {
1105
1109
Ok ( _) => ReturnCode :: Ok as _ ,
@@ -1127,7 +1131,7 @@ pub unsafe extern "C" fn deflateEnd(strm: *mut z_stream) -> i32 {
1127
1131
/// - `strm` is `NULL`
1128
1132
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
1129
1133
#[ export_name = prefix ! ( deflateReset) ]
1130
- pub unsafe extern "C" fn deflateReset ( strm : * mut z_stream ) -> i32 {
1134
+ pub unsafe extern "C-unwind " fn deflateReset ( strm : * mut z_stream ) -> i32 {
1131
1135
match DeflateStream :: from_stream_mut ( strm) {
1132
1136
Some ( stream) => zlib_rs:: deflate:: reset ( stream) as _ ,
1133
1137
None => ReturnCode :: StreamError as _ ,
@@ -1158,7 +1162,11 @@ pub unsafe extern "C" fn deflateReset(strm: *mut z_stream) -> i32 {
1158
1162
/// - `strm` is `NULL`
1159
1163
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
1160
1164
#[ export_name = prefix ! ( deflateParams) ]
1161
- pub unsafe extern "C" fn deflateParams ( strm : z_streamp , level : c_int , strategy : c_int ) -> c_int {
1165
+ pub unsafe extern "C-unwind" fn deflateParams (
1166
+ strm : z_streamp ,
1167
+ level : c_int ,
1168
+ strategy : c_int ,
1169
+ ) -> c_int {
1162
1170
let Ok ( strategy) = Strategy :: try_from ( strategy) else {
1163
1171
return ReturnCode :: StreamError as _ ;
1164
1172
} ;
@@ -1189,7 +1197,7 @@ pub unsafe extern "C" fn deflateParams(strm: z_streamp, level: c_int, strategy:
1189
1197
/// - `dictionary` is `NULL`
1190
1198
/// - `dictionary` and `dictLength` satisfy the requirements of [`core::slice::from_raw_parts_mut::<u8>`]
1191
1199
#[ export_name = prefix ! ( deflateSetDictionary) ]
1192
- pub unsafe extern "C" fn deflateSetDictionary (
1200
+ pub unsafe extern "C-unwind " fn deflateSetDictionary (
1193
1201
strm : z_streamp ,
1194
1202
dictionary : * const Bytef ,
1195
1203
dictLength : uInt ,
@@ -1225,7 +1233,7 @@ pub unsafe extern "C" fn deflateSetDictionary(
1225
1233
/// - `strm` is `NULL`
1226
1234
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
1227
1235
#[ export_name = prefix ! ( deflatePrime) ]
1228
- pub unsafe extern "C" fn deflatePrime ( strm : z_streamp , bits : c_int , value : c_int ) -> c_int {
1236
+ pub unsafe extern "C-unwind " fn deflatePrime ( strm : z_streamp , bits : c_int , value : c_int ) -> c_int {
1229
1237
match DeflateStream :: from_stream_mut ( strm) {
1230
1238
Some ( stream) => zlib_rs:: deflate:: prime ( stream, bits, value) as _ ,
1231
1239
None => ReturnCode :: StreamError as _ ,
@@ -1257,7 +1265,7 @@ pub unsafe extern "C" fn deflatePrime(strm: z_streamp, bits: c_int, value: c_int
1257
1265
/// - `bits` is `NULL`
1258
1266
/// - `bits` satisfies the requirements of [`core::ptr::write::<c_int>`]
1259
1267
#[ export_name = prefix ! ( deflatePending) ]
1260
- pub unsafe extern "C" fn deflatePending (
1268
+ pub unsafe extern "C-unwind " fn deflatePending (
1261
1269
strm : z_streamp ,
1262
1270
pending : * mut c_uint ,
1263
1271
bits : * mut c_int ,
@@ -1304,7 +1312,7 @@ pub unsafe extern "C" fn deflatePending(
1304
1312
/// - `source` is `NULL`
1305
1313
/// - `source` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
1306
1314
#[ export_name = prefix ! ( deflateCopy) ]
1307
- pub unsafe extern "C" fn deflateCopy ( dest : z_streamp , source : z_streamp ) -> c_int {
1315
+ pub unsafe extern "C-unwind " fn deflateCopy ( dest : z_streamp , source : z_streamp ) -> c_int {
1308
1316
let Some ( dest) = ( unsafe { dest. cast :: < MaybeUninit < DeflateStream > > ( ) . as_mut ( ) } ) else {
1309
1317
return ReturnCode :: StreamError as _ ;
1310
1318
} ;
@@ -1384,7 +1392,7 @@ pub unsafe extern "C" fn deflateCopy(dest: z_streamp, source: z_streamp) -> c_in
1384
1392
/// let strm = unsafe { strm.assume_init_mut() };
1385
1393
/// ```
1386
1394
#[ export_name = prefix ! ( deflateInit_) ]
1387
- pub unsafe extern "C" fn deflateInit_ (
1395
+ pub unsafe extern "C-unwind " fn deflateInit_ (
1388
1396
strm : z_streamp ,
1389
1397
level : c_int ,
1390
1398
version : * const c_char ,
@@ -1474,7 +1482,7 @@ pub unsafe extern "C" fn deflateInit_(
1474
1482
/// let strm = unsafe { strm.assume_init_mut() };
1475
1483
/// ```
1476
1484
#[ export_name = prefix ! ( deflateInit2_) ]
1477
- pub unsafe extern "C" fn deflateInit2_ (
1485
+ pub unsafe extern "C-unwind " fn deflateInit2_ (
1478
1486
strm : z_streamp ,
1479
1487
level : c_int ,
1480
1488
method : c_int ,
@@ -1531,7 +1539,7 @@ pub unsafe extern "C" fn deflateInit2_(
1531
1539
/// - `strm` is `NULL`
1532
1540
/// - `strm` satisfies the requirements of `&mut *strm` and was initialized with [`deflateInit_`] or similar
1533
1541
#[ export_name = prefix ! ( deflateTune) ]
1534
- pub unsafe extern "C" fn deflateTune (
1542
+ pub unsafe extern "C-unwind " fn deflateTune (
1535
1543
strm : z_streamp ,
1536
1544
good_length : c_int ,
1537
1545
max_lazy : c_int ,
0 commit comments