aboutsummaryrefslogtreecommitdiff
path: root/lib/pbdrv/mpack-config.h
blob: 994d9b7ca23207f1c5dd9dfbd142767fe83eac4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "pb-mem.h"

// use pb_* functions
#define MPACK_STDLIB 0

// pb_* memory management functions
#define MPACK_FREE pb_free
#define MPACK_MALLOC pb_malloc
#define MPACK_REALLOC pb_realloc
#define MPACK_MEMCPY pb_memcpy
#define MPACK_MEMCMP pb_memcmp

// more reasonable buffer size (all messages are small)
#define MPACK_BUFFER_SIZE 256
#define MPACK_STACK_SIZE MPACK_BUFFER_SIZE
#define MPACK_PAGE_SIZE MPACK_BUFFER_SIZE

// disable unused features (causes errors?)
#define MPACK_NODE 0
#define MPACK_BUILDER 0