add some UPB_API / UPB_API_INTERNAL declarations

PiperOrigin-RevId: 492551734
pull/13171/head
Eric Salo 2 years ago committed by Copybara-Service
parent b98c7c7b50
commit f458e05718
  1. 6
      upb/base/status.h
  2. 4
      upb/base/string_view.h
  3. 22
      upb/mem/arena.h
  4. 123
      upb/message/accessors.h
  5. 12
      upb/mini_table/common.h
  6. 25
      upb/mini_table/decode.h
  7. 14
      upbc/upbdev.h

@ -44,11 +44,11 @@ typedef struct {
extern "C" {
#endif
const char* upb_Status_ErrorMessage(const upb_Status* status);
bool upb_Status_IsOk(const upb_Status* status);
UPB_API const char* upb_Status_ErrorMessage(const upb_Status* status);
UPB_API bool upb_Status_IsOk(const upb_Status* status);
// These are no-op if |status| is NULL.
void upb_Status_Clear(upb_Status* status);
UPB_API void upb_Status_Clear(upb_Status* status);
void upb_Status_SetErrorMessage(upb_Status* status, const char* msg);
void upb_Status_SetErrorFormat(upb_Status* status, const char* fmt, ...)
UPB_PRINTF(2, 3);

@ -50,8 +50,8 @@ typedef struct {
extern "C" {
#endif
UPB_INLINE upb_StringView upb_StringView_FromDataAndSize(const char* data,
size_t size) {
UPB_API_INLINE upb_StringView upb_StringView_FromDataAndSize(const char* data,
size_t size) {
upb_StringView ret;
ret.data = data;
ret.size = size;

@ -62,11 +62,13 @@ extern "C" {
// Creates an arena from the given initial block (if any -- n may be 0).
// Additional blocks will be allocated from |alloc|. If |alloc| is NULL, this
// is a fixed-size arena and cannot grow.
upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc);
UPB_API upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc);
UPB_API void upb_Arena_Free(upb_Arena* a);
UPB_API bool upb_Arena_AddCleanup(upb_Arena* a, void* ud,
upb_CleanupFunc* func);
UPB_API bool upb_Arena_Fuse(upb_Arena* a, upb_Arena* b);
void upb_Arena_Free(upb_Arena* a);
bool upb_Arena_AddCleanup(upb_Arena* a, void* ud, upb_CleanupFunc* func);
bool upb_Arena_Fuse(upb_Arena* a, upb_Arena* b);
void* _upb_Arena_SlowMalloc(upb_Arena* a, size_t size);
size_t upb_Arena_SpaceAllocated(upb_Arena* arena);
uint32_t upb_Arena_DebugRefCount(upb_Arena* arena);
@ -76,7 +78,7 @@ UPB_INLINE size_t _upb_ArenaHas(upb_Arena* a) {
return (size_t)(h->end - h->ptr);
}
UPB_INLINE void* upb_Arena_Malloc(upb_Arena* a, size_t size) {
UPB_API_INLINE void* upb_Arena_Malloc(upb_Arena* a, size_t size) {
size = UPB_ALIGN_MALLOC(size);
if (UPB_UNLIKELY(_upb_ArenaHas(a) < size)) {
return _upb_Arena_SlowMalloc(a, size);
@ -109,8 +111,8 @@ UPB_INLINE void* upb_Arena_Malloc(upb_Arena* a, size_t size) {
// REQUIRES: (ptr, oldsize) was the last malloc/realloc from this arena.
// We could also add a upb_Arena_TryShrinkLast() which is simply a no-op if
// this was not the last alloc.
UPB_INLINE void upb_Arena_ShrinkLast(upb_Arena* a, void* ptr, size_t oldsize,
size_t size) {
UPB_API_INLINE void upb_Arena_ShrinkLast(upb_Arena* a, void* ptr,
size_t oldsize, size_t size) {
_upb_ArenaHead* h = (_upb_ArenaHead*)a;
oldsize = UPB_ALIGN_MALLOC(oldsize);
size = UPB_ALIGN_MALLOC(size);
@ -119,8 +121,8 @@ UPB_INLINE void upb_Arena_ShrinkLast(upb_Arena* a, void* ptr, size_t oldsize,
h->ptr = (char*)ptr + size;
}
UPB_INLINE void* upb_Arena_Realloc(upb_Arena* a, void* ptr, size_t oldsize,
size_t size) {
UPB_API_INLINE void* upb_Arena_Realloc(upb_Arena* a, void* ptr, size_t oldsize,
size_t size) {
_upb_ArenaHead* h = (_upb_ArenaHead*)a;
oldsize = UPB_ALIGN_MALLOC(oldsize);
size = UPB_ALIGN_MALLOC(size);
@ -145,7 +147,7 @@ UPB_INLINE void* upb_Arena_Realloc(upb_Arena* a, void* ptr, size_t oldsize,
return ret;
}
UPB_INLINE upb_Arena* upb_Arena_New(void) {
UPB_API_INLINE upb_Arena* upb_Arena_New(void) {
return upb_Arena_Init(NULL, 0, &upb_alloc_global);
}

@ -258,19 +258,19 @@ UPB_INLINE void _upb_MiniTable_ClearField(upb_Message* msg,
// EVERYTHING ABOVE THIS LINE IS INTERNAL - DO NOT USE /////////////////////////
UPB_INLINE void upb_MiniTable_ClearField(upb_Message* msg,
const upb_MiniTableField* field) {
UPB_API_INLINE void upb_MiniTable_ClearField(upb_Message* msg,
const upb_MiniTableField* field) {
_upb_MiniTable_ClearNonExtensionField(msg, field);
}
UPB_INLINE bool upb_MiniTable_HasField(const upb_Message* msg,
const upb_MiniTableField* field) {
UPB_API_INLINE bool upb_MiniTable_HasField(const upb_Message* msg,
const upb_MiniTableField* field) {
return _upb_MiniTable_HasNonExtensionField(msg, field);
}
UPB_INLINE bool upb_MiniTable_GetBool(const upb_Message* msg,
const upb_MiniTableField* field,
bool default_val) {
UPB_API_INLINE bool upb_MiniTable_GetBool(const upb_Message* msg,
const upb_MiniTableField* field,
bool default_val) {
UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte);
@ -279,18 +279,18 @@ UPB_INLINE bool upb_MiniTable_GetBool(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetBool(upb_Message* msg,
const upb_MiniTableField* field,
bool value) {
UPB_API_INLINE void upb_MiniTable_SetBool(upb_Message* msg,
const upb_MiniTableField* field,
bool value) {
UPB_ASSUME(field->descriptortype == kUpb_FieldType_Bool);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_1Byte);
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE int32_t upb_MiniTable_GetInt32(const upb_Message* msg,
const upb_MiniTableField* field,
int32_t default_val) {
UPB_API_INLINE int32_t upb_MiniTable_GetInt32(const upb_Message* msg,
const upb_MiniTableField* field,
int32_t default_val) {
UPB_ASSUME(field->descriptortype == kUpb_FieldType_Int32 ||
field->descriptortype == kUpb_FieldType_SInt32 ||
field->descriptortype == kUpb_FieldType_SFixed32 ||
@ -302,9 +302,9 @@ UPB_INLINE int32_t upb_MiniTable_GetInt32(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetInt32(upb_Message* msg,
const upb_MiniTableField* field,
int32_t value) {
UPB_API_INLINE void upb_MiniTable_SetInt32(upb_Message* msg,
const upb_MiniTableField* field,
int32_t value) {
UPB_ASSUME(field->descriptortype == kUpb_FieldType_Int32 ||
field->descriptortype == kUpb_FieldType_SInt32 ||
field->descriptortype == kUpb_FieldType_SFixed32);
@ -313,9 +313,9 @@ UPB_INLINE void upb_MiniTable_SetInt32(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE uint32_t upb_MiniTable_GetUInt32(const upb_Message* msg,
const upb_MiniTableField* field,
uint32_t default_val) {
UPB_API_INLINE uint32_t upb_MiniTable_GetUInt32(const upb_Message* msg,
const upb_MiniTableField* field,
uint32_t default_val) {
UPB_ASSUME(field->descriptortype == kUpb_FieldType_UInt32 ||
field->descriptortype == kUpb_FieldType_Fixed32);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
@ -325,9 +325,9 @@ UPB_INLINE uint32_t upb_MiniTable_GetUInt32(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetUInt32(upb_Message* msg,
const upb_MiniTableField* field,
uint32_t value) {
UPB_API_INLINE void upb_MiniTable_SetUInt32(upb_Message* msg,
const upb_MiniTableField* field,
uint32_t value) {
UPB_ASSUME(field->descriptortype == kUpb_FieldType_UInt32 ||
field->descriptortype == kUpb_FieldType_Fixed32);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
@ -335,10 +335,9 @@ UPB_INLINE void upb_MiniTable_SetUInt32(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE void upb_MiniTable_SetEnumProto2(upb_Message* msg,
const upb_MiniTable* msg_mini_table,
const upb_MiniTableField* field,
int32_t value) {
UPB_API_INLINE void upb_MiniTable_SetEnumProto2(
upb_Message* msg, const upb_MiniTable* msg_mini_table,
const upb_MiniTableField* field, int32_t value) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Enum);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte);
@ -347,9 +346,9 @@ UPB_INLINE void upb_MiniTable_SetEnumProto2(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE int64_t upb_MiniTable_GetInt64(const upb_Message* msg,
const upb_MiniTableField* field,
uint64_t default_val) {
UPB_API_INLINE int64_t upb_MiniTable_GetInt64(const upb_Message* msg,
const upb_MiniTableField* field,
uint64_t default_val) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Int64 ||
field->descriptortype == kUpb_FieldType_SInt64 ||
field->descriptortype == kUpb_FieldType_SFixed64);
@ -360,9 +359,9 @@ UPB_INLINE int64_t upb_MiniTable_GetInt64(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetInt64(upb_Message* msg,
const upb_MiniTableField* field,
int64_t value) {
UPB_API_INLINE void upb_MiniTable_SetInt64(upb_Message* msg,
const upb_MiniTableField* field,
int64_t value) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Int64 ||
field->descriptortype == kUpb_FieldType_SInt64 ||
field->descriptortype == kUpb_FieldType_SFixed64);
@ -371,9 +370,9 @@ UPB_INLINE void upb_MiniTable_SetInt64(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE uint64_t upb_MiniTable_GetUInt64(const upb_Message* msg,
const upb_MiniTableField* field,
uint64_t default_val) {
UPB_API_INLINE uint64_t upb_MiniTable_GetUInt64(const upb_Message* msg,
const upb_MiniTableField* field,
uint64_t default_val) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_UInt64 ||
field->descriptortype == kUpb_FieldType_Fixed64);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
@ -383,9 +382,9 @@ UPB_INLINE uint64_t upb_MiniTable_GetUInt64(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetUInt64(upb_Message* msg,
const upb_MiniTableField* field,
uint64_t value) {
UPB_API_INLINE void upb_MiniTable_SetUInt64(upb_Message* msg,
const upb_MiniTableField* field,
uint64_t value) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_UInt64 ||
field->descriptortype == kUpb_FieldType_Fixed64);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
@ -393,9 +392,9 @@ UPB_INLINE void upb_MiniTable_SetUInt64(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE float upb_MiniTable_GetFloat(const upb_Message* msg,
const upb_MiniTableField* field,
float default_val) {
UPB_API_INLINE float upb_MiniTable_GetFloat(const upb_Message* msg,
const upb_MiniTableField* field,
float default_val) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Float);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte);
@ -404,18 +403,18 @@ UPB_INLINE float upb_MiniTable_GetFloat(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetFloat(upb_Message* msg,
const upb_MiniTableField* field,
float value) {
UPB_API_INLINE void upb_MiniTable_SetFloat(upb_Message* msg,
const upb_MiniTableField* field,
float value) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Float);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_4Byte);
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE double upb_MiniTable_GetDouble(const upb_Message* msg,
const upb_MiniTableField* field,
double default_val) {
UPB_API_INLINE double upb_MiniTable_GetDouble(const upb_Message* msg,
const upb_MiniTableField* field,
double default_val) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Double);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte);
@ -424,16 +423,16 @@ UPB_INLINE double upb_MiniTable_GetDouble(const upb_Message* msg,
return ret;
}
UPB_INLINE void upb_MiniTable_SetDouble(upb_Message* msg,
const upb_MiniTableField* field,
double value) {
UPB_API_INLINE void upb_MiniTable_SetDouble(upb_Message* msg,
const upb_MiniTableField* field,
double value) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Double);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
UPB_ASSUME(_upb_MiniTableField_GetRep(field) == kUpb_FieldRep_8Byte);
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE upb_StringView
UPB_API_INLINE upb_StringView
upb_MiniTable_GetString(const upb_Message* msg, const upb_MiniTableField* field,
upb_StringView def_val) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Bytes ||
@ -445,9 +444,9 @@ upb_MiniTable_GetString(const upb_Message* msg, const upb_MiniTableField* field,
return ret;
}
UPB_INLINE void upb_MiniTable_SetString(upb_Message* msg,
const upb_MiniTableField* field,
upb_StringView value) {
UPB_API_INLINE void upb_MiniTable_SetString(upb_Message* msg,
const upb_MiniTableField* field,
upb_StringView value) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Bytes ||
field->descriptortype == kUpb_FieldType_String);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
@ -455,7 +454,7 @@ UPB_INLINE void upb_MiniTable_SetString(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &value);
}
UPB_INLINE const upb_Message* upb_MiniTable_GetMessage(
UPB_API_INLINE const upb_Message* upb_MiniTable_GetMessage(
const upb_Message* msg, const upb_MiniTableField* field,
upb_Message* default_val) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Message ||
@ -468,10 +467,10 @@ UPB_INLINE const upb_Message* upb_MiniTable_GetMessage(
return ret;
}
UPB_INLINE void upb_MiniTable_SetMessage(upb_Message* msg,
const upb_MiniTable* mini_table,
const upb_MiniTableField* field,
upb_Message* sub_message) {
UPB_API_INLINE void upb_MiniTable_SetMessage(upb_Message* msg,
const upb_MiniTable* mini_table,
const upb_MiniTableField* field,
upb_Message* sub_message) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Message ||
field->descriptortype == kUpb_FieldType_Group);
UPB_ASSUME(!upb_IsRepeatedOrMap(field));
@ -481,7 +480,7 @@ UPB_INLINE void upb_MiniTable_SetMessage(upb_Message* msg,
_upb_MiniTable_SetNonExtensionField(msg, field, &sub_message);
}
UPB_INLINE upb_Message* upb_MiniTable_GetMutableMessage(
UPB_API_INLINE upb_Message* upb_MiniTable_GetMutableMessage(
upb_Message* msg, const upb_MiniTable* mini_table,
const upb_MiniTableField* field, upb_Arena* arena) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Message ||
@ -498,7 +497,7 @@ UPB_INLINE upb_Message* upb_MiniTable_GetMutableMessage(
return sub_message;
}
UPB_INLINE const upb_Array* upb_MiniTable_GetArray(
UPB_API_INLINE const upb_Array* upb_MiniTable_GetArray(
const upb_Message* msg, const upb_MiniTableField* field) {
const upb_Array* ret;
const upb_Array* default_val = NULL;
@ -506,7 +505,7 @@ UPB_INLINE const upb_Array* upb_MiniTable_GetArray(
return ret;
}
UPB_INLINE upb_Array* upb_MiniTable_GetMutableArray(
UPB_API_INLINE upb_Array* upb_MiniTable_GetMutableArray(
upb_Message* msg, const upb_MiniTableField* field) {
return (upb_Array*)upb_MiniTable_GetArray(msg, field);
}

@ -53,17 +53,17 @@ typedef enum {
extern "C" {
#endif
const upb_MiniTableField* upb_MiniTable_FindFieldByNumber(
UPB_API const upb_MiniTableField* upb_MiniTable_FindFieldByNumber(
const upb_MiniTable* table, uint32_t number);
upb_FieldType upb_MiniTableField_Type(const upb_MiniTableField* field);
UPB_API upb_FieldType upb_MiniTableField_Type(const upb_MiniTableField* field);
UPB_INLINE bool upb_MiniTableField_IsExtension(
UPB_API_INLINE bool upb_MiniTableField_IsExtension(
const upb_MiniTableField* field) {
return field->mode & kUpb_LabelFlags_IsExtension;
}
UPB_INLINE bool upb_MiniTableField_HasPresence(
UPB_API_INLINE bool upb_MiniTableField_HasPresence(
const upb_MiniTableField* field) {
if (upb_MiniTableField_IsExtension(field)) {
return !upb_IsRepeatedOrMap(field);
@ -72,12 +72,12 @@ UPB_INLINE bool upb_MiniTableField_HasPresence(
}
}
UPB_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable(
UPB_API_INLINE const upb_MiniTable* upb_MiniTable_GetSubMessageTable(
const upb_MiniTable* mini_table, const upb_MiniTableField* field) {
return mini_table->subs[field->submsg_index].submsg;
}
UPB_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable(
UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTable_GetSubEnumTable(
const upb_MiniTable* mini_table, const upb_MiniTableField* field) {
return mini_table->subs[field->submsg_index].subenum;
}

@ -54,9 +54,9 @@ upb_MiniTable* _upb_MiniTable_Build(const char* data, size_t len,
upb_MiniTablePlatform platform,
upb_Arena* arena, upb_Status* status);
UPB_INLINE upb_MiniTable* upb_MiniTable_Build(const char* data, size_t len,
upb_Arena* arena,
upb_Status* status) {
UPB_API_INLINE upb_MiniTable* upb_MiniTable_Build(const char* data, size_t len,
upb_Arena* arena,
upb_Status* status) {
return _upb_MiniTable_Build(data, len, kUpb_MiniTablePlatform_Native, arena,
status);
}
@ -67,14 +67,15 @@ UPB_INLINE upb_MiniTable* upb_MiniTable_Build(const char* data, size_t len,
// to link the message field later, at which point it will no longer be treated
// as unknown. However there is no synchronization for this operation, which
// means parallel mutation requires external synchronization.
void upb_MiniTable_SetSubMessage(upb_MiniTable* table,
upb_MiniTableField* field,
const upb_MiniTable* sub);
UPB_API void upb_MiniTable_SetSubMessage(upb_MiniTable* table,
upb_MiniTableField* field,
const upb_MiniTable* sub);
// Links an enum field to a MiniTable for that enum. All enum fields must
// be linked prior to parsing.
void upb_MiniTable_SetSubEnum(upb_MiniTable* table, upb_MiniTableField* field,
const upb_MiniTableEnum* sub);
UPB_API void upb_MiniTable_SetSubEnum(upb_MiniTable* table,
upb_MiniTableField* field,
const upb_MiniTableEnum* sub);
const char* _upb_MiniTableExtension_Build(const char* data, size_t len,
upb_MiniTableExtension* ext,
@ -83,16 +84,16 @@ const char* _upb_MiniTableExtension_Build(const char* data, size_t len,
upb_MiniTablePlatform platform,
upb_Status* status);
UPB_INLINE const char* upb_MiniTableExtension_Build(
UPB_API_INLINE const char* upb_MiniTableExtension_Build(
const char* data, size_t len, upb_MiniTableExtension* ext,
const upb_MiniTable* extendee, upb_MiniTableSub sub, upb_Status* status) {
return _upb_MiniTableExtension_Build(data, len, ext, extendee, sub,
kUpb_MiniTablePlatform_Native, status);
}
upb_MiniTableEnum* upb_MiniTableEnum_Build(const char* data, size_t len,
upb_Arena* arena,
upb_Status* status);
UPB_API upb_MiniTableEnum* upb_MiniTableEnum_Build(const char* data, size_t len,
upb_Arena* arena,
upb_Status* status);
// Like upb_MiniTable_Build(), but the user provides a buffer of layout data so
// it can be reused from call to call, avoiding repeated realloc()/free().

@ -41,16 +41,18 @@ extern "C" {
// Consume |buf|, deserialize it to a Code_Generator_Request proto, construct a
// upbc_Code_Generator_Request, and return it as a JSON-encoded string.
upb_StringView upbdev_ProcessInput(const char* buf, size_t size,
upb_Arena* arena, upb_Status* status);
UPB_API upb_StringView upbdev_ProcessInput(const char* buf, size_t size,
upb_Arena* arena,
upb_Status* status);
// Decode |buf| from JSON, serialize to wire format, and return it.
upb_StringView upbdev_ProcessOutput(const char* buf, size_t size,
upb_Arena* arena, upb_Status* status);
UPB_API upb_StringView upbdev_ProcessOutput(const char* buf, size_t size,
upb_Arena* arena,
upb_Status* status);
// Decode |buf| from JSON, serialize to wire format, and write it to stdout.
void upbdev_ProcessStdout(const char* buf, size_t size, upb_Arena* arena,
upb_Status* status);
UPB_API void upbdev_ProcessStdout(const char* buf, size_t size,
upb_Arena* arena, upb_Status* status);
#ifdef __cplusplus
} /* extern "C" */

Loading…
Cancel
Save