aboutsummaryrefslogtreecommitdiff
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.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h
index 0f70ecde..71a4f5fb 100644
--- a/src/google/protobuf/io/coded_stream.h
+++ b/src/google/protobuf/io/coded_stream.h
@@ -133,11 +133,17 @@
#endif
#endif
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/port.h>
#include <google/protobuf/stubs/port.h>
-namespace google {
+#include <google/protobuf/port_def.inc>
+
+#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
+#include "util/coding/varint.h"
+#endif
+
+namespace google {
namespace protobuf {
class DescriptorPool;
@@ -263,7 +269,6 @@ class LIBPROTOBUF_EXPORT CodedInputStream {
GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE uint32 ReadTagNoLastTag();
-
// This usually a faster alternative to ReadTag() when cutoff is a manifest
// constant. It does particularly well for cutoff >= 127. The first part
// of the return value is the tag that was read, though it can also be 0 in
@@ -328,6 +333,7 @@ class LIBPROTOBUF_EXPORT CodedInputStream {
// It also checks for some cases where, due to optimizations,
// MergeFromCodedStream() can incorrectly return true.
bool ConsumedEntireMessage();
+ void SetConsumed() { legitimate_message_end_ = true; }
// Limits ----------------------------------------------------------
// Limits are used when parsing length-delimited embedded messages.
@@ -384,7 +390,7 @@ class LIBPROTOBUF_EXPORT CodedInputStream {
// This is unrelated to PushLimit()/PopLimit().
void SetTotalBytesLimit(int total_bytes_limit);
- PROTOBUF_RUNTIME_DEPRECATED(
+ GOOGLE_PROTOBUF_DEPRECATED_MSG(
"Please use the single parameter version of SetTotalBytesLimit(). The "
"second parameter is ignored.")
void SetTotalBytesLimit(int total_bytes_limit, int) {
@@ -851,7 +857,8 @@ class LIBPROTOBUF_EXPORT CodedOutputStream {
}
static bool IsDefaultSerializationDeterministic() {
- return default_serialization_deterministic_.load(std::memory_order_relaxed) != 0;
+ return default_serialization_deterministic_.load(
+ std::memory_order_relaxed) != 0;
}
private:
@@ -889,7 +896,7 @@ class LIBPROTOBUF_EXPORT CodedOutputStream {
// that wants deterministic serialization by default needs to call
// SetDefaultSerializationDeterministic() or ensure on its own that another
// thread has done so.
- friend void ::google::protobuf::internal::MapTestForceDeterministic();
+ friend void internal::MapTestForceDeterministic();
static void SetDefaultSerializationDeterministic() {
default_serialization_deterministic_.store(true, std::memory_order_relaxed);
}
@@ -1390,11 +1397,13 @@ inline bool CodedInputStream::Skip(int count) {
} // namespace io
} // namespace protobuf
+} // namespace google
#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#pragma runtime_checks("c", restore)
#endif // _MSC_VER && !defined(__INTEL_COMPILER)
-} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__