File indexing completed on 2025-01-30 10:25:24
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_
0009 #define UPB_REFLECTION_DESC_STATE_INTERNAL_H_
0010
0011 #include "upb/mem/arena.h"
0012 #include "upb/mini_descriptor/internal/encode.h"
0013
0014
0015 #include "upb/port/def.inc"
0016
0017
0018
0019 typedef struct {
0020 upb_MtDataEncoder e;
0021 size_t bufsize;
0022 char* buf;
0023 char* ptr;
0024 } upb_DescState;
0025
0026 #ifdef __cplusplus
0027 extern "C" {
0028 #endif
0029
0030 UPB_INLINE void _upb_DescState_Init(upb_DescState* d) {
0031 d->bufsize = kUpb_MtDataEncoder_MinSize * 2;
0032 d->buf = NULL;
0033 d->ptr = NULL;
0034 }
0035
0036 bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a);
0037
0038 #ifdef __cplusplus
0039 }
0040 #endif
0041
0042 #include "upb/port/undef.inc"
0043
0044 #endif