WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
desc_state.h
Go to the documentation of this file.
1// Protocol Buffers - Google's data interchange format
2// Copyright 2023 Google LLC. All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
7
8#ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_
9#define UPB_REFLECTION_DESC_STATE_INTERNAL_H_
10
11#include "upb/mem/arena.h"
13
14// Must be last.
15#include "upb/port/def.inc"
16
17// Manages the storage for mini descriptor strings as they are being encoded.
18// TODO: Move some of this state directly into the encoder, maybe.
19typedef struct {
21 size_t bufsize;
22 char* buf;
23 char* ptr;
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
32 d->buf = NULL;
33 d->ptr = NULL;
34}
35
37
38#ifdef __cplusplus
39} /* extern "C" */
40#endif
41
42#include "upb/port/undef.inc"
43
44#endif /* UPB_REFLECTION_DESC_STATE_INTERNAL_H_ */
#define UPB_INLINE
Definition def.inc:144
bool _upb_DescState_Grow(upb_DescState *d, upb_Arena *a)
UPB_INLINE void _upb_DescState_Init(upb_DescState *d)
Definition desc_state.h:30
#define kUpb_MtDataEncoder_MinSize
Definition encode.h:20
Definition arena.h:29
Definition desc_state.h:19
char * buf
Definition desc_state.h:22
size_t bufsize
Definition desc_state.h:21
upb_MtDataEncoder e
Definition desc_state.h:20
char * ptr
Definition desc_state.h:23
Definition encode.h:22