diff options
| author | vdf <[email protected]> | 2022-02-10 16:48:43 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:43 +0300 | 
| commit | c52fa3470f4973c134b3c09a16dcdc7167eaece3 (patch) | |
| tree | 21781c6b8c1e8436f9a6e49e43d60b342dca246f /library/cpp | |
| parent | 7a849a93d8126b563f33ae88ba19b99a6e951a83 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
| -rw-r--r-- | library/cpp/protobuf/util/pb_io.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/protobuf/util/pb_io.h | 2 | ||||
| -rw-r--r-- | library/cpp/protobuf/util/pb_io_ut.cpp | 4 | 
3 files changed, 8 insertions, 8 deletions
| diff --git a/library/cpp/protobuf/util/pb_io.cpp b/library/cpp/protobuf/util/pb_io.cpp index 6270ee06243..6ed26e553e6 100644 --- a/library/cpp/protobuf/util/pb_io.cpp +++ b/library/cpp/protobuf/util/pb_io.cpp @@ -43,14 +43,14 @@ namespace NProtoBuf {          }          Base64EncodeUrl(rawData, dataBase64); -    } +    }       TString SerializeToBase64String(const Message& m) {          TString s;          SerializeToBase64String(m, s);          return s; -    } - +    }  +       bool TrySerializeToBase64String(const Message& m, TString& dataBase64) {          try {              SerializeToBase64String(m, dataBase64); @@ -67,8 +67,8 @@ namespace NProtoBuf {          TString result;          printer.PrintToString(message, &result);          return result; -    } - +    }  +       bool MergePartialFromString(NProtoBuf::Message& m, const TStringBuf serializedProtoMessage) {          google::protobuf::io::CodedInputStream input(reinterpret_cast<const ui8*>(serializedProtoMessage.data()), serializedProtoMessage.size());          bool ok = m.MergePartialFromCodedStream(&input); diff --git a/library/cpp/protobuf/util/pb_io.h b/library/cpp/protobuf/util/pb_io.h index 493c84cb5f3..0ebe8ccb6c5 100644 --- a/library/cpp/protobuf/util/pb_io.h +++ b/library/cpp/protobuf/util/pb_io.h @@ -29,7 +29,7 @@ namespace NProtoBuf {          ParseFromBase64String(dataBase64, m, allowUneven);          return m;      } - +       /* Serialize message into string and apply base64 URL encoding.       */      TString SerializeToBase64String(const Message& m); diff --git a/library/cpp/protobuf/util/pb_io_ut.cpp b/library/cpp/protobuf/util/pb_io_ut.cpp index 875d6dc6026..21d7596b826 100644 --- a/library/cpp/protobuf/util/pb_io_ut.cpp +++ b/library/cpp/protobuf/util/pb_io_ut.cpp @@ -44,11 +44,11 @@ static const TString INCORRECT_ENUM_ID_MESSAGE =  )";  static const TString CORRECT_BASE64_MESSAGE = "CCo,"; - +   static const TString CORRECT_UNEVEN_BASE64_MESSAGE = "CCo";  static const TString INCORRECT_BASE64_MESSAGE = "CC"; - +   Y_UNIT_TEST_SUITE(TTestProtoBufIO) {      Y_UNIT_TEST(TestBase64) {          { | 
