Skip to content

Commit e8ea41b

Browse files
committed
Regenerate.
1 parent 5c8c836 commit e8ea41b

File tree

4 files changed

+95
-6
lines changed

4 files changed

+95
-6
lines changed

Reference/Conformance/conformance/conformance.pb.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ struct Conformance_ConformanceRequest: @unchecked Sendable {
209209

210210
/// The full name for the test message to use; for the moment, either:
211211
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
212-
/// protobuf_test_messages.google.protobuf.TestAllTypesProto2 or
213-
/// protobuf_test_messages.editions.google.protobuf.TestAllTypesProto2 or
212+
/// protobuf_test_messages.proto2.TestAllTypesProto2 or
213+
/// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
214214
/// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
215215
/// protobuf_test_messages.editions.TestAllTypesEdition2023.
216216
var messageType: String = String()

Reference/upstream/conformance/conformance.pb.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ struct Conformance_ConformanceRequest: @unchecked Sendable {
209209

210210
/// The full name for the test message to use; for the moment, either:
211211
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
212-
/// protobuf_test_messages.google.protobuf.TestAllTypesProto2 or
213-
/// protobuf_test_messages.editions.google.protobuf.TestAllTypesProto2 or
212+
/// protobuf_test_messages.proto2.TestAllTypesProto2 or
213+
/// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
214214
/// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
215215
/// protobuf_test_messages.editions.TestAllTypesEdition2023.
216216
var messageType: String = String()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// DO NOT EDIT.
2+
// swift-format-ignore-file
3+
//
4+
// Generated by the Swift generator plugin for the protocol buffer compiler.
5+
// Source: google/protobuf/unittest_string_type.proto
6+
//
7+
// For information on using the generated types, please see the documentation:
8+
// https://github.com/apple/swift-protobuf/
9+
10+
// Protocol Buffers - Google's data interchange format
11+
// Copyright 2008 Google Inc. All rights reserved.
12+
//
13+
// Use of this source code is governed by a BSD-style
14+
// license that can be found in the LICENSE file or at
15+
// https://developers.google.com/open-source/licenses/bsd
16+
17+
import Foundation
18+
import SwiftProtobuf
19+
20+
// If the compiler emits an error on this type, it is because this file
21+
// was generated by a version of the `protoc` Swift plug-in that is
22+
// incompatible with the version of SwiftProtobuf to which you are linking.
23+
// Please ensure that you are building against the same version of the API
24+
// that was used to generate this file.
25+
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
26+
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
27+
typealias Version = _2
28+
}
29+
30+
struct ProtobufUnittest_EntryProto: @unchecked Sendable {
31+
// SwiftProtobuf.Message conformance is added in an extension below. See the
32+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
33+
// methods supported on all messages.
34+
35+
var value: Data {
36+
get {return _value ?? Data()}
37+
set {_value = newValue}
38+
}
39+
/// Returns true if `value` has been explicitly set.
40+
var hasValue: Bool {return self._value != nil}
41+
/// Clears the value of `value`. Subsequent reads from it will return its default value.
42+
mutating func clearValue() {self._value = nil}
43+
44+
var unknownFields = SwiftProtobuf.UnknownStorage()
45+
46+
init() {}
47+
48+
fileprivate var _value: Data? = nil
49+
}
50+
51+
// MARK: - Code below here is support for the SwiftProtobuf runtime.
52+
53+
fileprivate let _protobuf_package = "protobuf_unittest"
54+
55+
extension ProtobufUnittest_EntryProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
56+
static let protoMessageName: String = _protobuf_package + ".EntryProto"
57+
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
58+
3: .same(proto: "value"),
59+
]
60+
61+
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
62+
while let fieldNumber = try decoder.nextFieldNumber() {
63+
// The use of inline closures is to circumvent an issue where the compiler
64+
// allocates stack space for every case branch when no optimizations are
65+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
66+
switch fieldNumber {
67+
case 3: try { try decoder.decodeSingularBytesField(value: &self._value) }()
68+
default: break
69+
}
70+
}
71+
}
72+
73+
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
74+
// The use of inline closures is to circumvent an issue where the compiler
75+
// allocates stack space for every if/case branch local when no optimizations
76+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
77+
// https://github.com/apple/swift-protobuf/issues/1182
78+
try { if let v = self._value {
79+
try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
80+
} }()
81+
try unknownFields.traverse(visitor: &visitor)
82+
}
83+
84+
static func ==(lhs: ProtobufUnittest_EntryProto, rhs: ProtobufUnittest_EntryProto) -> Bool {
85+
if lhs._value != rhs._value {return false}
86+
if lhs.unknownFields != rhs.unknownFields {return false}
87+
return true
88+
}
89+
}

Sources/Conformance/conformance.pb.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ struct Conformance_ConformanceRequest: @unchecked Sendable {
209209

210210
/// The full name for the test message to use; for the moment, either:
211211
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
212-
/// protobuf_test_messages.google.protobuf.TestAllTypesProto2 or
213-
/// protobuf_test_messages.editions.google.protobuf.TestAllTypesProto2 or
212+
/// protobuf_test_messages.proto2.TestAllTypesProto2 or
213+
/// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
214214
/// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
215215
/// protobuf_test_messages.editions.TestAllTypesEdition2023.
216216
var messageType: String = String()

0 commit comments

Comments
 (0)