Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:18

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2023 Google LLC.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 #ifndef UPB_REFLECTION_DEF_POOL_INTERNAL_H_
0009 #define UPB_REFLECTION_DEF_POOL_INTERNAL_H_
0010 
0011 #include "upb/mini_descriptor/decode.h"
0012 #include "upb/reflection/def_pool.h"
0013 
0014 // Must be last.
0015 #include "upb/port/def.inc"
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020 
0021 upb_Arena* _upb_DefPool_Arena(const upb_DefPool* s);
0022 size_t _upb_DefPool_BytesLoaded(const upb_DefPool* s);
0023 upb_ExtensionRegistry* _upb_DefPool_ExtReg(const upb_DefPool* s);
0024 
0025 bool _upb_DefPool_InsertExt(upb_DefPool* s, const upb_MiniTableExtension* ext,
0026                             const upb_FieldDef* f);
0027 bool _upb_DefPool_InsertSym(upb_DefPool* s, upb_StringView sym, upb_value v,
0028                             upb_Status* status);
0029 bool _upb_DefPool_LookupSym(const upb_DefPool* s, const char* sym, size_t size,
0030                             upb_value* v);
0031 
0032 void** _upb_DefPool_ScratchData(const upb_DefPool* s);
0033 size_t* _upb_DefPool_ScratchSize(const upb_DefPool* s);
0034 void _upb_DefPool_SetPlatform(upb_DefPool* s, upb_MiniTablePlatform platform);
0035 
0036 // For generated code only: loads a generated descriptor.
0037 typedef struct _upb_DefPool_Init {
0038   struct _upb_DefPool_Init** deps;  // Dependencies of this file.
0039   const upb_MiniTableFile* layout;
0040   const char* filename;
0041   upb_StringView descriptor;  // Serialized descriptor.
0042 } _upb_DefPool_Init;
0043 
0044 bool _upb_DefPool_LoadDefInit(upb_DefPool* s, const _upb_DefPool_Init* init);
0045 
0046 // Should only be directly called by tests. This variant lets us suppress
0047 // the use of compiled-in tables, forcing a rebuild of the tables at runtime.
0048 bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init,
0049                                 bool rebuild_minitable);
0050 
0051 #ifdef __cplusplus
0052 } /* extern "C" */
0053 #endif
0054 
0055 #include "upb/port/undef.inc"
0056 
0057 #endif /* UPB_REFLECTION_DEF_POOL_INTERNAL_H_ */