xref: /aosp_15_r20/external/golang-protobuf/proto/proto_methods.go (revision 1c12ee1efe575feb122dbf939ff15148a3b3e8f2)
1*1c12ee1eSDan Willemsen// Copyright 2019 The Go Authors. All rights reserved.
2*1c12ee1eSDan Willemsen// Use of this source code is governed by a BSD-style
3*1c12ee1eSDan Willemsen// license that can be found in the LICENSE file.
4*1c12ee1eSDan Willemsen
5*1c12ee1eSDan Willemsen// The protoreflect build tag disables use of fast-path methods.
6*1c12ee1eSDan Willemsen//go:build !protoreflect
7*1c12ee1eSDan Willemsen// +build !protoreflect
8*1c12ee1eSDan Willemsen
9*1c12ee1eSDan Willemsenpackage proto
10*1c12ee1eSDan Willemsen
11*1c12ee1eSDan Willemsenimport (
12*1c12ee1eSDan Willemsen	"google.golang.org/protobuf/reflect/protoreflect"
13*1c12ee1eSDan Willemsen	"google.golang.org/protobuf/runtime/protoiface"
14*1c12ee1eSDan Willemsen)
15*1c12ee1eSDan Willemsen
16*1c12ee1eSDan Willemsenconst hasProtoMethods = true
17*1c12ee1eSDan Willemsen
18*1c12ee1eSDan Willemsenfunc protoMethods(m protoreflect.Message) *protoiface.Methods {
19*1c12ee1eSDan Willemsen	return m.ProtoMethods()
20*1c12ee1eSDan Willemsen}
21