commit | c600d6c086a67c0ccaaa6b5b3b68215495300c02 | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Tue Jan 21 15:00:33 2020 -0800 |
committer | Damien Neil <dneil@google.com> | Wed Jan 22 20:57:14 2020 +0000 |
tree | 79176c74512f4fdbc74194dd5918a659c11b3416 | |
parent | d30e561d9e497724375c48fb29e129c7acf6d56d [diff] |
all: do best-effort initialization check on fast path unmarshal Add a fast check for required fields to the fast path unmarshal. This is best-effort and will fail to detect some initialized messages: Messages with more than 64 required fields, messages split across multiple tags, possibly other cases. In the cases where it works (which is most of them in practice), this permits us to skip the IsInitialized check. Change-Id: I6b70953a333033a5e64fb7ca37a59786cb0f75a0 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/215878 Reviewed-by: Joe Tsai <joetsai@google.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.