yyjson 0.10.0
A high performance C JSON library.
yyjson_alc Struct Reference

#include <yyjson.h>

Data Fields

void *(* malloc )(void *ctx, size_t size)
 
void *(* realloc )(void *ctx, void *ptr, size_t old_size, size_t size)
 
void(* free )(void *ctx, void *ptr)
 
void * ctx
 

Detailed Description

A memory allocator.

Typically you don't need to use it, unless you want to customize your own memory allocator.

Field Documentation

◆ ctx

void* yyjson_alc::ctx

A context for malloc/realloc/free, can be NULL.

◆ free

void(* yyjson_alc::free) (void *ctx, void *ptr)

Same as libc's free(ptr), should not be NULL.

◆ malloc

void *(* yyjson_alc::malloc) (void *ctx, size_t size)

Same as libc's malloc(size), should not be NULL.

◆ realloc

void *(* yyjson_alc::realloc) (void *ctx, void *ptr, size_t old_size, size_t size)

Same as libc's realloc(ptr, size), should not be NULL.


The documentation for this struct was generated from the following file: