Skip to content

Commit

Permalink
Regenerate.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvl committed Jun 27, 2024
1 parent 5c8c836 commit e8ea41b
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Reference/Conformance/conformance/conformance.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ struct Conformance_ConformanceRequest: @unchecked Sendable {

/// The full name for the test message to use; for the moment, either:
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
/// protobuf_test_messages.google.protobuf.TestAllTypesProto2 or
/// protobuf_test_messages.editions.google.protobuf.TestAllTypesProto2 or
/// protobuf_test_messages.proto2.TestAllTypesProto2 or
/// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
/// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
/// protobuf_test_messages.editions.TestAllTypesEdition2023.
var messageType: String = String()
Expand Down
4 changes: 2 additions & 2 deletions Reference/upstream/conformance/conformance.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ struct Conformance_ConformanceRequest: @unchecked Sendable {

/// The full name for the test message to use; for the moment, either:
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
/// protobuf_test_messages.google.protobuf.TestAllTypesProto2 or
/// protobuf_test_messages.editions.google.protobuf.TestAllTypesProto2 or
/// protobuf_test_messages.proto2.TestAllTypesProto2 or
/// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
/// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
/// protobuf_test_messages.editions.TestAllTypesEdition2023.
var messageType: String = String()
Expand Down
89 changes: 89 additions & 0 deletions Reference/upstream/google/protobuf/unittest_string_type.pb.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: google/protobuf/unittest_string_type.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/

// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

import Foundation
import SwiftProtobuf

// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}

struct ProtobufUnittest_EntryProto: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

var value: Data {
get {return _value ?? Data()}
set {_value = newValue}
}
/// Returns true if `value` has been explicitly set.
var hasValue: Bool {return self._value != nil}
/// Clears the value of `value`. Subsequent reads from it will return its default value.
mutating func clearValue() {self._value = nil}

var unknownFields = SwiftProtobuf.UnknownStorage()

init() {}

fileprivate var _value: Data? = nil
}

// MARK: - Code below here is support for the SwiftProtobuf runtime.

fileprivate let _protobuf_package = "protobuf_unittest"

extension ProtobufUnittest_EntryProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".EntryProto"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
3: .same(proto: "value"),
]

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 3: try { try decoder.decodeSingularBytesField(value: &self._value) }()
default: break
}
}
}

func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._value {
try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
} }()
try unknownFields.traverse(visitor: &visitor)
}

static func ==(lhs: ProtobufUnittest_EntryProto, rhs: ProtobufUnittest_EntryProto) -> Bool {
if lhs._value != rhs._value {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
4 changes: 2 additions & 2 deletions Sources/Conformance/conformance.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ struct Conformance_ConformanceRequest: @unchecked Sendable {

/// The full name for the test message to use; for the moment, either:
/// protobuf_test_messages.proto3.TestAllTypesProto3 or
/// protobuf_test_messages.google.protobuf.TestAllTypesProto2 or
/// protobuf_test_messages.editions.google.protobuf.TestAllTypesProto2 or
/// protobuf_test_messages.proto2.TestAllTypesProto2 or
/// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
/// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
/// protobuf_test_messages.editions.TestAllTypesEdition2023.
var messageType: String = String()
Expand Down

0 comments on commit e8ea41b

Please sign in to comment.