Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Bundle 3.19.4-1 (2023-01-29)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen[bot] committed Jan 29, 2023
1 parent e827395 commit c3b4395
Show file tree
Hide file tree
Showing 136 changed files with 19,828 additions and 14,782 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# protobuf 3.12.4-1
# protobuf 3.19.4-1

- mingw-w64-i686-protobuf-3.12.4-1-any.pkg.tar.xz
- mingw-w64-x86_64-protobuf-3.12.4-1-any.pkg.tar.xz
- mingw-w64-ucrt-x86_64-protobuf-3.12.4-1-any.pkg.tar.xz
- mingw-w64-i686-protobuf-3.19.4-1-any.pkg.tar.xz
- mingw-w64-x86_64-protobuf-3.19.4-1-any.pkg.tar.xz
- mingw-w64-ucrt-x86_64-protobuf-3.19.4-1-any.pkg.tar.xz
Binary file modified bin32/protoc.exe
Binary file not shown.
Binary file modified bin64/protoc.exe
Binary file not shown.
27 changes: 17 additions & 10 deletions include/google/protobuf/any.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,29 +60,36 @@ class PROTOBUF_EXPORT AnyMetadata {
typedef ArenaStringPtr ValueType;
public:
// AnyMetadata does not take ownership of "type_url" and "value".
AnyMetadata(UrlType* type_url, ValueType* value);
constexpr AnyMetadata(UrlType* type_url, ValueType* value)
: type_url_(type_url), value_(value) {}

// Packs a message using the default type URL prefix: "type.googleapis.com".
// The resulted type URL will be "type.googleapis.com/<message_full_name>".
// Returns false if serializing the message failed.
template <typename T>
void PackFrom(const T& message) {
InternalPackFrom(message, kTypeGoogleApisComPrefix, T::FullMessageName());
bool PackFrom(Arena* arena, const T& message) {
return InternalPackFrom(arena, message, kTypeGoogleApisComPrefix,
T::FullMessageName());
}

void PackFrom(const Message& message);
bool PackFrom(Arena* arena, const Message& message);

// Packs a message using the given type URL prefix. The type URL will be
// constructed by concatenating the message type's full name to the prefix
// with an optional "/" separator if the prefix doesn't already end with "/".
// For example, both PackFrom(message, "type.googleapis.com") and
// PackFrom(message, "type.googleapis.com/") yield the same result type
// URL: "type.googleapis.com/<message_full_name>".
// Returns false if serializing the message failed.
template <typename T>
void PackFrom(const T& message, StringPiece type_url_prefix) {
InternalPackFrom(message, type_url_prefix, T::FullMessageName());
bool PackFrom(Arena* arena, const T& message,
StringPiece type_url_prefix) {
return InternalPackFrom(arena, message, type_url_prefix,
T::FullMessageName());
}

void PackFrom(const Message& message, const std::string& type_url_prefix);
bool PackFrom(Arena* arena, const Message& message,
StringPiece type_url_prefix);

// Unpacks the payload into the given message. Returns false if the message's
// type doesn't match the type specified in the type URL (i.e., the full
Expand All @@ -104,7 +111,7 @@ class PROTOBUF_EXPORT AnyMetadata {
}

private:
void InternalPackFrom(const MessageLite& message,
bool InternalPackFrom(Arena* arena, const MessageLite& message,
StringPiece type_url_prefix,
StringPiece type_name);
bool InternalUnpackTo(StringPiece type_name,
Expand All @@ -124,14 +131,14 @@ class PROTOBUF_EXPORT AnyMetadata {
//
// NOTE: this function is available publicly as:
// google::protobuf::Any() // static method on the generated message type.
bool ParseAnyTypeUrl(const std::string& type_url, std::string* full_type_name);
bool ParseAnyTypeUrl(StringPiece type_url, std::string* full_type_name);

// Get the proto type name and prefix from Any::type_url value. For example,
// passing "type.googleapis.com/rpc.QueryOrigin" will return
// "type.googleapis.com/" in *url_prefix and "rpc.QueryOrigin" in
// *full_type_name. Returns false if the type_url does not have a "/" in the
// type url separating the full type name.
bool ParseAnyTypeUrl(const std::string& type_url, std::string* url_prefix,
bool ParseAnyTypeUrl(StringPiece type_url, std::string* url_prefix,
std::string* full_type_name);

// See if message is of type google.protobuf.Any, if so, return the descriptors
Expand Down
Loading

0 comments on commit c3b4395

Please sign in to comment.