We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfa0849 commit 1f0f8b3Copy full SHA for 1f0f8b3
Sources/SwiftProtobuf/DoubleParser.swift
@@ -16,6 +16,11 @@ import Foundation
16
17
/// Support parsing float/double values from UTF-8
18
internal class DoubleParser {
19
+ // Temporary buffer so we can null-terminate the UTF-8 string
20
+ // before calling the C standard libray to parse it.
21
+ // In theory, JSON writers should be able to represent any IEEE Double
22
+ // in at most 25 bytes, but many writers will emit more digits than
23
+ // necessary, so we size this generously.
24
#if swift(>=4.1)
25
private var work =
26
UnsafeMutableRawBufferPointer.allocate(byteCount: 128,
0 commit comments