Sha256: b3bac33b3f5c3ee895eee9f91ce0b1f5a1734781d70d51abca8b22b8914e4a89
Contents?: true
Size: 926 Bytes
Versions: 22
Compression:
Stored size: 926 Bytes
Contents
// Protocol Buffers - Google's data interchange format // Copyright 2023 Google LLC. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #include "upb/reflection/internal/desc_state.h" // Must be last. #include "upb/port/def.inc" bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a) { const size_t oldbufsize = d->bufsize; const int used = d->ptr - d->buf; if (!d->buf) { d->buf = upb_Arena_Malloc(a, d->bufsize); if (!d->buf) return false; d->ptr = d->buf; d->e.end = d->buf + d->bufsize; } if (oldbufsize - used < kUpb_MtDataEncoder_MinSize) { d->bufsize *= 2; d->buf = upb_Arena_Realloc(a, d->buf, oldbufsize, d->bufsize); if (!d->buf) return false; d->ptr = d->buf + used; d->e.end = d->buf + d->bufsize; } return true; }
Version data entries
22 entries across 22 versions & 1 rubygems