diff --git a/src/headers/lz4.jl b/src/headers/lz4.jl index f5c0bc8..39b6d63 100644 --- a/src/headers/lz4.jl +++ b/src/headers/lz4.jl @@ -47,10 +47,10 @@ Returns the number of bytes written into buffer `dst` (necessarily <= dstcapacit """ function LZ4_compress_fast(src, dst, srcsize, dstcapacity, acceleration=1) GC.@preserve src dst begin - # allow Julia to GC while compressing + # Allow Julia to GC while compressing gc_state = @ccall(jl_gc_safe_enter()::Int8) ret = ccall((:LZ4_compress_fast, liblz4), Cint, (Ptr{UInt8}, Ptr{UInt8}, Cint, Cint, Cint), src, dst, srcsize, dstcapacity, acceleration) - # leave GC-safe region, waiting for GC to complete if it's running + # Leave GC-safe region, waiting for GC to complete if it's running @ccall(jl_gc_safe_leave(gc_state::Int8)::Cvoid) end check_compression_error(ret, "LZ4_compress_fast") @@ -70,10 +70,10 @@ Returns number of bytes written into `dst` (necessarily <= dstcapacity) """ function LZ4_compress_destSize(src, dst, srcsize, dstcapacity) GC.@preserve src dst begin - # allow Julia to GC while compressing + # Allow Julia to GC while compressing gc_state = @ccall(jl_gc_safe_enter()::Int8) ret = ccall((:LZ4_compress_destSize, liblz4), Cint, (Ptr{UInt8}, Ptr{UInt8}, Ptr{Cint}, Cint), src, dst, srcsize, dstcapacity) - # leave GC-safe region, waiting for GC to complete if it's running + # Leave GC-safe region, waiting for GC to complete if it's running @ccall(jl_gc_safe_leave(gc_state::Int8)::Cvoid) end check_compression_error(ret, "LZ4_compress_destSize") @@ -163,10 +163,10 @@ Returns the number of bytes decompressed into destination buffer (necessarily <= """ function LZ4_decompress_safe(src, dst, cmpsize, dstcapacity) GC.@preserve src dst begin - # allow Julia to GC while decompressing + # Allow Julia to GC while decompressing gc_state = @ccall(jl_gc_safe_enter()::Int8) ret = ccall((:LZ4_decompress_safe, liblz4), Cint, (Ptr{UInt8}, Ptr{UInt8}, Cint, Cint), src, dst, cmpsize, dstcapacity) - # leave GC-safe region, waiting for GC to complete if it's running + # Leave GC-safe region, waiting for GC to complete if it's running @ccall(jl_gc_safe_leave(gc_state::Int8)::Cvoid) end check_decompression_error(ret, "LZ4_decompress_safe")