To implement extensions in Rust, we are going to need a symbol we can depend on to force-link the C++ extension registration code. The `descriptor_table_xxxxx` variable seems ideal for this: it already exists and is not public-facing, so we can reuse it without increasing code size. This CL marks it `extern "C"` to ensure that we can safely access it from Rust. PiperOrigin-RevId: 696615312pull/19258/head
parent
6ceef1cdeb
commit
37b10b8f81
7 changed files with 36 additions and 17 deletions
@ -1,17 +0,0 @@ |
||||
#region Copyright notice and license |
||||
// 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 |
||||
#endregion |
||||
|
||||
namespace Google.Protobuf.Reflection; |
||||
|
||||
internal sealed partial class FeatureSetDescriptor |
||||
{ |
||||
// Canonical serialized form of the edition defaults, generated by embed_edition_defaults. |
||||
private const string DefaultsBase64 = |
||||
"ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; |
||||
} |
Loading…
Reference in new issue