Classes | Typedefs | Functions | Variables
upb/upb/upb.c File Reference
#include <errno.h>
#include <float.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "upb/upb_internal.h"
#include "upb/port_def.inc"
Include dependency graph for upb/upb/upb.c:

Go to the source code of this file.

Classes

struct  cleanup_ent
 
struct  mem_block
 

Typedefs

typedef struct cleanup_ent cleanup_ent
 

Functions

void * _upb_Arena_SlowMalloc (upb_Arena *a, size_t size)
 
void _upb_EncodeRoundTripDouble (double val, char *buf, size_t size)
 
void _upb_EncodeRoundTripFloat (float val, char *buf, size_t size)
 
static void arena_dofree (upb_Arena *a)
 
static upb_Arenaarena_findroot (upb_Arena *a)
 
upb_Arenaarena_initslow (void *mem, size_t n, upb_alloc *alloc)
 
static void upb_Arena_addblock (upb_Arena *a, upb_Arena *root, void *ptr, size_t size)
 
bool upb_Arena_AddCleanup (upb_Arena *a, void *ud, upb_CleanupFunc *func)
 
static bool upb_Arena_Allocblock (upb_Arena *a, size_t size)
 
static void * upb_Arena_doalloc (upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
 
void upb_Arena_Free (upb_Arena *a)
 
bool upb_Arena_Fuse (upb_Arena *a1, upb_Arena *a2)
 
upb_Arenaupb_Arena_Init (void *mem, size_t n, upb_alloc *alloc)
 
static bool upb_cleanup_has_initial_block (uintptr_t cleanup_metadata)
 
static uintptr_t upb_cleanup_metadata (uint32_t *cleanup, bool has_initial_block)
 
static uint32_tupb_cleanup_pointer (uintptr_t cleanup_metadata)
 
static void upb_FixLocale (char *p)
 
static void * upb_global_allocfunc (upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
 
void upb_Status_Clear (upb_Status *status)
 
const char * upb_Status_ErrorMessage (const upb_Status *status)
 
bool upb_Status_IsOk (const upb_Status *status)
 
void upb_Status_SetErrorFormat (upb_Status *status, const char *fmt,...)
 
void upb_Status_SetErrorMessage (upb_Status *status, const char *msg)
 
void upb_Status_VAppendErrorFormat (upb_Status *status, const char *fmt, va_list args)
 
void upb_Status_VSetErrorFormat (upb_Status *status, const char *fmt, va_list args)
 

Variables

static const size_t memblock_reserve = UPB_ALIGN_UP(sizeof(mem_block), 16)
 
upb_alloc upb_alloc_global = {&upb_global_allocfunc}
 

Typedef Documentation

◆ cleanup_ent

typedef struct cleanup_ent cleanup_ent

Function Documentation

◆ _upb_Arena_SlowMalloc()

void* _upb_Arena_SlowMalloc ( upb_Arena a,
size_t  size 
)

Definition at line 176 of file upb/upb/upb.c.

◆ _upb_EncodeRoundTripDouble()

void _upb_EncodeRoundTripDouble ( double  val,
char *  buf,
size_t  size 
)

Definition at line 344 of file upb/upb/upb.c.

◆ _upb_EncodeRoundTripFloat()

void _upb_EncodeRoundTripFloat ( float  val,
char *  buf,
size_t  size 
)

Definition at line 354 of file upb/upb/upb.c.

◆ arena_dofree()

static void arena_dofree ( upb_Arena a)
static

Definition at line 250 of file upb/upb/upb.c.

◆ arena_findroot()

static upb_Arena* arena_findroot ( upb_Arena a)
static

Definition at line 135 of file upb/upb/upb.c.

◆ arena_initslow()

upb_Arena* arena_initslow ( void *  mem,
size_t  n,
upb_alloc alloc 
)

Definition at line 190 of file upb/upb/upb.c.

◆ upb_Arena_addblock()

static void upb_Arena_addblock ( upb_Arena a,
upb_Arena root,
void *  ptr,
size_t  size 
)
static

Definition at line 146 of file upb/upb/upb.c.

◆ upb_Arena_AddCleanup()

bool upb_Arena_AddCleanup ( upb_Arena a,
void *  ud,
upb_CleanupFunc func 
)

Definition at line 278 of file upb/upb/upb.c.

◆ upb_Arena_Allocblock()

static bool upb_Arena_Allocblock ( upb_Arena a,
size_t  size 
)
static

Definition at line 166 of file upb/upb/upb.c.

◆ upb_Arena_doalloc()

static void* upb_Arena_doalloc ( upb_alloc alloc,
void *  ptr,
size_t  oldsize,
size_t  size 
)
static

Definition at line 182 of file upb/upb/upb.c.

◆ upb_Arena_Free()

void upb_Arena_Free ( upb_Arena a)

Definition at line 273 of file upb/upb/upb.c.

◆ upb_Arena_Fuse()

bool upb_Arena_Fuse ( upb_Arena a1,
upb_Arena a2 
)

Definition at line 299 of file upb/upb/upb.c.

◆ upb_Arena_Init()

upb_Arena* upb_Arena_Init ( void *  mem,
size_t  n,
upb_alloc alloc 
)

Definition at line 216 of file upb/upb/upb.c.

◆ upb_cleanup_has_initial_block()

static bool upb_cleanup_has_initial_block ( uintptr_t  cleanup_metadata)
static

Definition at line 106 of file upb/upb/upb.c.

◆ upb_cleanup_metadata()

static uintptr_t upb_cleanup_metadata ( uint32_t cleanup,
bool  has_initial_block 
)
static

Definition at line 110 of file upb/upb/upb.c.

◆ upb_cleanup_pointer()

static uint32_t* upb_cleanup_pointer ( uintptr_t  cleanup_metadata)
static

Definition at line 102 of file upb/upb/upb.c.

◆ upb_FixLocale()

static void upb_FixLocale ( char *  p)
static

Definition at line 333 of file upb/upb/upb.c.

◆ upb_global_allocfunc()

static void* upb_global_allocfunc ( upb_alloc alloc,
void *  ptr,
size_t  oldsize,
size_t  size 
)
static

Definition at line 90 of file upb/upb/upb.c.

◆ upb_Status_Clear()

void upb_Status_Clear ( upb_Status status)

Definition at line 44 of file upb/upb/upb.c.

◆ upb_Status_ErrorMessage()

const char* upb_Status_ErrorMessage ( const upb_Status status)

Definition at line 52 of file upb/upb/upb.c.

◆ upb_Status_IsOk()

bool upb_Status_IsOk ( const upb_Status status)

Definition at line 50 of file upb/upb/upb.c.

◆ upb_Status_SetErrorFormat()

void upb_Status_SetErrorFormat ( upb_Status status,
const char *  fmt,
  ... 
)

Definition at line 63 of file upb/upb/upb.c.

◆ upb_Status_SetErrorMessage()

void upb_Status_SetErrorMessage ( upb_Status status,
const char *  msg 
)

Definition at line 56 of file upb/upb/upb.c.

◆ upb_Status_VAppendErrorFormat()

void upb_Status_VAppendErrorFormat ( upb_Status status,
const char *  fmt,
va_list  args 
)

Definition at line 78 of file upb/upb/upb.c.

◆ upb_Status_VSetErrorFormat()

void upb_Status_VSetErrorFormat ( upb_Status status,
const char *  fmt,
va_list  args 
)

Definition at line 70 of file upb/upb/upb.c.

Variable Documentation

◆ memblock_reserve

const size_t memblock_reserve = UPB_ALIGN_UP(sizeof(mem_block), 16)
static

Definition at line 133 of file upb/upb/upb.c.

◆ upb_alloc_global

upb_alloc upb_alloc_global = {&upb_global_allocfunc}

Definition at line 115 of file upb/upb/upb.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:36