aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/protobuf
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/protobuf
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/protobuf')
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/json_util.cc2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/json_util.h4
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/message.h2
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/messagext.cc10
-rw-r--r--contrib/libs/protobuf/src/google/protobuf/messagext.h30
5 files changed, 24 insertions, 24 deletions
diff --git a/contrib/libs/protobuf/src/google/protobuf/json_util.cc b/contrib/libs/protobuf/src/google/protobuf/json_util.cc
index 7264b06814..450ce1da57 100644
--- a/contrib/libs/protobuf/src/google/protobuf/json_util.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/json_util.cc
@@ -4,7 +4,7 @@ namespace google {
namespace protobuf {
namespace io {
-void PrintJSONString(IOutputStream& stream, const TProtoStringType& string) {
+void PrintJSONString(IOutputStream& stream, const TProtoStringType& string) {
stream << '"';
for (const char c: string) {
switch(c) {
diff --git a/contrib/libs/protobuf/src/google/protobuf/json_util.h b/contrib/libs/protobuf/src/google/protobuf/json_util.h
index 52a4a69a57..ad3a4a5bfe 100644
--- a/contrib/libs/protobuf/src/google/protobuf/json_util.h
+++ b/contrib/libs/protobuf/src/google/protobuf/json_util.h
@@ -6,7 +6,7 @@ namespace google {
namespace protobuf {
namespace io {
-void PrintJSONString(IOutputStream& stream, const TProtoStringType& string);
+void PrintJSONString(IOutputStream& stream, const TProtoStringType& string);
template<class T>
struct TAsJSON {
@@ -20,7 +20,7 @@ public:
};
template<class T>
-inline IOutputStream& operator <<(IOutputStream& stream, const TAsJSON<T>& protoAsJSON) {
+inline IOutputStream& operator <<(IOutputStream& stream, const TAsJSON<T>& protoAsJSON) {
protoAsJSON.T_.PrintJSON(stream);
return stream;
};
diff --git a/contrib/libs/protobuf/src/google/protobuf/message.h b/contrib/libs/protobuf/src/google/protobuf/message.h
index 43c795471a..37d92ea393 100644
--- a/contrib/libs/protobuf/src/google/protobuf/message.h
+++ b/contrib/libs/protobuf/src/google/protobuf/message.h
@@ -344,7 +344,7 @@ class PROTOBUF_EXPORT Message : public MessageLite {
bool SerializeToArcadiaStream(IOutputStream* output) const;
bool SerializePartialToArcadiaStream(IOutputStream* output) const;
- virtual void PrintJSON(IOutputStream&) const;
+ virtual void PrintJSON(IOutputStream&) const;
io::TAsJSON<Message> AsJSON() const {
return io::TAsJSON<Message>(*this);
diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.cc b/contrib/libs/protobuf/src/google/protobuf/messagext.cc
index e4cfa141f1..1923205598 100644
--- a/contrib/libs/protobuf/src/google/protobuf/messagext.cc
+++ b/contrib/libs/protobuf/src/google/protobuf/messagext.cc
@@ -101,7 +101,7 @@ bool TOutputStreamProxy::Write(const void* buffer, int size) {
}
-void TProtoSerializer::Save(IOutputStream* out, const Message& msg) {
+void TProtoSerializer::Save(IOutputStream* out, const Message& msg) {
int size = msg.ByteSize();
if (size > MaxSizeBytes) {
ythrow yexception() << "Message size " << size << " exceeds " << MaxSizeBytes;
@@ -113,11 +113,11 @@ void TProtoSerializer::Save(IOutputStream* out, const Message& msg) {
ythrow yexception() << "Cannot write protobuf::Message to output stream";
}
-// Reading varint32 directly from IInputStream (might be slow if input requires buffering).
+// Reading varint32 directly from IInputStream (might be slow if input requires buffering).
// Copy-pasted with small modifications from protobuf/io/coded_stream (ReadVarint32FromArray)
// Returns true if succeeded, false if stream has ended, throws exception if data is corrupted
-static bool ReadVarint32(IInputStream* input, ui32& size) {
+static bool ReadVarint32(IInputStream* input, ui32& size) {
size_t res;
ui8 b;
@@ -166,7 +166,7 @@ private:
ui8* Buffer;
};
-void TProtoSerializer::Load(IInputStream* input, Message& msg) {
+void TProtoSerializer::Load(IInputStream* input, Message& msg) {
msg.Clear();
MergeFrom(input, msg);
}
@@ -184,7 +184,7 @@ void TProtoSerializer::MergeFrom(IInputStream* input, Message& msg) {
ythrow yexception() << "Cannot read protobuf::Message (" << msg.GetTypeName() << ") from input stream";
}
-TProtoReader::TProtoReader(IInputStream* input, const size_t bufferSize)
+TProtoReader::TProtoReader(IInputStream* input, const size_t bufferSize)
: IStream(input)
, Buffer(bufferSize)
{
diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.h b/contrib/libs/protobuf/src/google/protobuf/messagext.h
index b9cb169187..9176cee1e8 100644
--- a/contrib/libs/protobuf/src/google/protobuf/messagext.h
+++ b/contrib/libs/protobuf/src/google/protobuf/messagext.h
@@ -2,7 +2,7 @@
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stream.h>
-#include <util/stream/output.h>
+#include <util/stream/output.h>
#include <util/generic/buffer.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
@@ -32,13 +32,13 @@ namespace io {
/// Parse*Seq methods read message size from stream to find a message boundary
-/// there is not parse from IInputStream, because it is not push-backable
+/// there is not parse from IInputStream, because it is not push-backable
bool ParseFromCodedStreamSeq(Message* msg, io::CodedInputStream* input);
bool ParseFromZeroCopyStreamSeq(Message* msg, io::ZeroCopyInputStream* input);
/// Serialize*Seq methods write message size as varint before writing a message
-/// there is no serialize to IOutputStream, because it is not push-backable
+/// there is no serialize to IOutputStream, because it is not push-backable
bool SerializePartialToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output);
bool SerializeToCodedStreamSeq(const Message* msg, io::CodedOutputStream* output);
@@ -62,7 +62,7 @@ private:
class TInputStreamProxy: public io::CopyingInputStream, public TErrorState {
public:
- inline TInputStreamProxy(IInputStream* slave)
+ inline TInputStreamProxy(IInputStream* slave)
: mSlave(slave)
{
}
@@ -70,12 +70,12 @@ class TInputStreamProxy: public io::CopyingInputStream, public TErrorState {
virtual int Read(void* buffer, int size);
private:
- IInputStream* mSlave;
+ IInputStream* mSlave;
};
class TOutputStreamProxy: public io::CopyingOutputStream, public TErrorState {
public:
- inline TOutputStreamProxy(IOutputStream* slave)
+ inline TOutputStreamProxy(IOutputStream* slave)
: mSlave(slave)
{
}
@@ -83,13 +83,13 @@ class TOutputStreamProxy: public io::CopyingOutputStream, public TErrorState {
virtual bool Write(const void* buffer, int size);
private:
- IOutputStream* mSlave;
+ IOutputStream* mSlave;
};
class TCopyingInputStreamAdaptor: public TInputStreamProxy, public CopyingInputStreamAdaptor {
public:
- TCopyingInputStreamAdaptor(IInputStream* inputStream)
+ TCopyingInputStreamAdaptor(IInputStream* inputStream)
: TInputStreamProxy(inputStream)
, CopyingInputStreamAdaptor(this)
{ }
@@ -97,7 +97,7 @@ public:
class TCopyingOutputStreamAdaptor: public TOutputStreamProxy, public CopyingOutputStreamAdaptor {
public:
- TCopyingOutputStreamAdaptor(IOutputStream* outputStream)
+ TCopyingOutputStreamAdaptor(IOutputStream* outputStream)
: TOutputStreamProxy(outputStream)
, CopyingOutputStreamAdaptor(this)
{ }
@@ -106,8 +106,8 @@ public:
class TProtoSerializer {
public:
- static void Save(IOutputStream* output, const Message& msg);
- static void Load(IInputStream* input, Message& msg);
+ static void Save(IOutputStream* output, const Message& msg);
+ static void Load(IInputStream* input, Message& msg);
static void MergeFrom(IInputStream* input, Message& msg);
// similar interface for protobuf coded streams
@@ -130,7 +130,7 @@ public:
*/
class TProtoReader {
public:
- TProtoReader(IInputStream* input, const size_t bufferSize = DefaultBufferSize);
+ TProtoReader(IInputStream* input, const size_t bufferSize = DefaultBufferSize);
/**
* Reads protobuf message
@@ -143,7 +143,7 @@ public:
bool Load(Message& msg);
private:
- IInputStream* IStream;
+ IInputStream* IStream;
TBuffer Buffer;
static const size_t DefaultBufferSize = (1 << 16);
@@ -154,11 +154,11 @@ private:
} // namespace google
// arcadia-style serialization
-inline void Save(IOutputStream* output, const google::protobuf::Message& msg) {
+inline void Save(IOutputStream* output, const google::protobuf::Message& msg) {
google::protobuf::io::TProtoSerializer::Save(output, msg);
}
-inline void Load(IInputStream* input, google::protobuf::Message& msg) {
+inline void Load(IInputStream* input, google::protobuf::Message& msg) {
google::protobuf::io::TProtoSerializer::Load(input, msg);
}