aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/io/coded_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/io/coded_stream.h')
-rw-r--r--src/google/protobuf/io/coded_stream.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h
index dc42e2fe..557312d3 100644
--- a/src/google/protobuf/io/coded_stream.h
+++ b/src/google/protobuf/io/coded_stream.h
@@ -140,6 +140,8 @@ namespace protobuf {
class DescriptorPool;
class MessageFactory;
+namespace internal { void MapTestForceDeterministic(); }
+
namespace io {
// Defined in this file.
@@ -867,6 +869,10 @@ class LIBPROTOBUF_EXPORT CodedOutputStream {
default_serialization_deterministic_;
}
+ static bool IsDefaultSerializationDeterministic() {
+ return default_serialization_deterministic_;
+ }
+
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedOutputStream);
@@ -900,6 +906,8 @@ class LIBPROTOBUF_EXPORT CodedOutputStream {
static size_t VarintSize32Fallback(uint32 value);
// See above. Other projects may use "friend" to allow them to call this.
+ // Requires: no protocol buffer serialization in progress.
+ friend void ::google::protobuf::internal::MapTestForceDeterministic();
static void SetDefaultSerializationDeterministic() {
default_serialization_deterministic_ = true;
}