Skip to content

Commit f7bbcca

Browse files
committed
fix
1 parent bb24854 commit f7bbcca

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

‎rules/brotli/tgt_refcount.rs‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,24 @@ fn f8(
7474
a4: Ptr<Ptr<u8>>,
7575
a5: Ptr<usize>,
7676
) -> ::brotli_sys::BrotliDecoderResult {
77-
unsafe {
78-
let _a2: Ptr<*const u8> =
79-
Ptr::alloc((&*(*a2.upgrade().deref()).upgrade().deref()) as *const u8);
80-
77+
let __in = a2.read();
78+
let __in_len = a1.read();
79+
let __r = __in.with_slice(__in_len, |__s| {
8180
a1.with_mut(|_v1| {
82-
_a2.with_mut(|_v2| {
83-
a3.with_mut(|_v3| {
84-
::brotli_sys::BrotliDecoderDecompressStream(
85-
a0,
86-
_v1 as *mut usize,
87-
_v2 as *mut *const u8,
88-
_v3 as *mut usize,
89-
std::ptr::null_mut(),
90-
std::ptr::null_mut(),
91-
)
92-
})
81+
a3.with_mut(|_v3| unsafe {
82+
::brotli_sys::BrotliDecoderDecompressStream(
83+
a0,
84+
_v1,
85+
&mut __s.as_ptr(),
86+
_v3,
87+
std::ptr::null_mut(),
88+
std::ptr::null_mut(),
89+
)
9390
})
9491
})
95-
}
92+
});
93+
a2.write(__in.offset(__in_len - a1.read()));
94+
__r
9695
}
9796

9897
fn f9(a0: *mut ::brotli_sys::BrotliDecoderState, a1: Ptr<usize>) -> Ptr<u8> {

0 commit comments

Comments
 (0)