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_MINI_DESCRIPTOR_BUILD_ENUM_H_ 9 #define UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_ 10 11 #include "upb/base/status.h" 12 #include "upb/mem/arena.h" 13 #include "upb/mini_table/enum.h" 14 15 // Must be last. 16 #include "upb/port/def.inc" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 // Builds a upb_MiniTableEnum from an enum mini descriptor. 23 // The mini descriptor must be for an enum, not a message. 24 UPB_API upb_MiniTableEnum* upb_MiniTableEnum_Build(const char* data, size_t len, 25 upb_Arena* arena, 26 upb_Status* status); 27 28 #ifdef __cplusplus 29 } /* extern "C" */ 30 #endif 31 32 #include "upb/port/undef.inc" 33 34 #endif // UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_ 35