chromium/third_party/grpc/src/third_party/upb/upb/msg.c

/*
 * Copyright (c) 2009-2021, Google LLC
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Google LLC nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL Google LLC BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "upb/msg.h"

#include "upb/internal/table.h"
#include "upb/msg_internal.h"
#include "upb/port_def.inc"

/** upb_Message ***************************************************************/

static const size_t overhead =;

static const upb_Message_Internal* upb_Message_Getinternal_const(
    const upb_Message* msg) {}

upb_Message* _upb_Message_New(const upb_MiniTable* l, upb_Arena* a) {}

void _upb_Message_Clear(upb_Message* msg, const upb_MiniTable* l) {}

static bool realloc_internal(upb_Message* msg, size_t need, upb_Arena* arena) {}

bool _upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len,
                             upb_Arena* arena) {}

void _upb_Message_DiscardUnknown_shallow(upb_Message* msg) {}

const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len) {}

const upb_Message_Extension* _upb_Message_Getexts(const upb_Message* msg,
                                                  size_t* count) {}

const upb_Message_Extension* _upb_Message_Getext(
    const upb_Message* msg, const upb_MiniTable_Extension* e) {}

void _upb_Message_Clearext(upb_Message* msg,
                           const upb_MiniTable_Extension* ext_l) {}

upb_Message_Extension* _upb_Message_GetOrCreateExtension(
    upb_Message* msg, const upb_MiniTable_Extension* e, upb_Arena* arena) {}

size_t upb_Message_ExtensionCount(const upb_Message* msg) {}

/** upb_Array *****************************************************************/

bool _upb_array_realloc(upb_Array* arr, size_t min_size, upb_Arena* arena) {}

static upb_Array* getorcreate_array(upb_Array** arr_ptr, int elem_size_lg2,
                                    upb_Arena* arena) {}

void* _upb_Array_Resize_fallback(upb_Array** arr_ptr, size_t size,
                                 int elem_size_lg2, upb_Arena* arena) {}

bool _upb_Array_Append_fallback(upb_Array** arr_ptr, const void* value,
                                int elem_size_lg2, upb_Arena* arena) {}

/** upb_Map *******************************************************************/

upb_Map* _upb_Map_New(upb_Arena* a, size_t key_size, size_t value_size) {}

static void _upb_mapsorter_getkeys(const void* _a, const void* _b, void* a_key,
                                   void* b_key, size_t size) {}

#define UPB_COMPARE_INTEGERS

static int _upb_mapsorter_cmpi64(const void* _a, const void* _b) {}

static int _upb_mapsorter_cmpu64(const void* _a, const void* _b) {}

static int _upb_mapsorter_cmpi32(const void* _a, const void* _b) {}

static int _upb_mapsorter_cmpu32(const void* _a, const void* _b) {}

static int _upb_mapsorter_cmpbool(const void* _a, const void* _b) {}

static int _upb_mapsorter_cmpstr(const void* _a, const void* _b) {}

#undef UPB_COMPARE_INTEGERS

bool _upb_mapsorter_pushmap(_upb_mapsorter* s, upb_FieldType key_type,
                            const upb_Map* map, _upb_sortedmap* sorted) {}