Skip to content

Commit 225b43a

Browse files
author
Raymond McCrae
committed
Update to fix deprecated method calls
1 parent cd96226 commit 225b43a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/HTMLSAXParser/EscapeSpecialCharacters.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public extension Data {
5252
let outputBufferCapacity = outputLength
5353
let outputBuffer = UnsafeMutablePointer<UInt8>.allocate(capacity: outputBufferCapacity)
5454
defer {
55-
outputBuffer.deallocate(capacity: Int(outputBufferCapacity))
55+
outputBuffer.deallocate()
5656
}
5757
let result = htmlEncodeEntities(outputBuffer,
5858
outputLengthBytes,
@@ -99,8 +99,8 @@ public extension Data {
9999
var inputLengthBytes = UnsafeMutablePointer<CInt>.allocate(capacity: 1)
100100
var outputLengthBytes = UnsafeMutablePointer<CInt>.allocate(capacity: 1)
101101
defer {
102-
inputLengthBytes.deallocate(capacity: 1)
103-
outputLengthBytes.deallocate(capacity: 1)
102+
inputLengthBytes.deallocate()
103+
outputLengthBytes.deallocate()
104104
}
105105

106106
var loop = true

0 commit comments

Comments
 (0)