libcbor
0.5.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Main Page
+
Data Structures
Data Structures
Data Structure Index
+
Data Fields
+
All
a
b
c
d
e
f
i
k
l
m
n
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
i
k
l
m
n
p
r
s
t
u
v
w
+
Files
File List
+
Globals
+
All
_
c
d
t
u
+
Functions
_
c
Variables
Typedefs
Enumerations
+
Enumerator
_
c
Macros
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
src
allocators.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3
*
4
* libcbor is free software; you can redistribute it and/or modify
5
* it under the terms of the MIT license. See LICENSE for details.
6
*/
7
8
#include "
cbor/common.h
"
9
10
_cbor_malloc_t
_cbor_malloc
= malloc;
11
_cbor_realloc_t
_cbor_realloc
= realloc;
12
_cbor_free_t
_cbor_free
= free;
13
14
void
cbor_set_allocs
(
_cbor_malloc_t
custom_malloc,
_cbor_realloc_t
custom_realloc,
_cbor_free_t
custom_free)
15
{
16
_cbor_malloc
= custom_malloc;
17
_cbor_realloc
= custom_realloc;
18
_cbor_free
= custom_free;
19
}
_cbor_free_t
void(* _cbor_free_t)(void *)
Definition:
common.h:63
_cbor_realloc_t
void *(* _cbor_realloc_t)(void *, size_t)
Definition:
common.h:62
_cbor_malloc
_cbor_malloc_t _cbor_malloc
Definition:
allocators.c:10
_cbor_realloc
_cbor_realloc_t _cbor_realloc
Definition:
allocators.c:11
_cbor_malloc_t
void *(* _cbor_malloc_t)(size_t)
Definition:
common.h:61
common.h
cbor_set_allocs
void cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free)
Sets the memory management routines to use.
Definition:
allocators.c:14
_cbor_free
_cbor_free_t _cbor_free
Definition:
allocators.c:12
Generated on Mon Feb 6 2017 00:26:19 for libcbor by
1.8.12