<libroxml
version="3.0.2"
/>
contact:
tristan.lelong@libroxml.net
src
roxml_tune.h
Go to the documentation of this file.
1
29
#ifndef ROXML_TUNE_H
30
#define ROXML_TUNE_H
31
32
#ifdef ROXML_DEF_H
33
#error "roxml_defines.h must be included after roxml_tune.h to be tuned."
34
#endif
35
36
#ifdef HAVE_CONFIG_H
37
#include "config.h"
38
#endif
39
40
/*************** Define the default behaviour **********************/
41
42
/* Is the target library thread safe or not
43
* This option should be activated.
44
* If unsure, set to 1
45
*/
46
#ifndef CONFIG_XML_THREAD_SAFE
47
#if(CONFIG_XML_HEAP_BUFFERS==1)
48
#error "The CONFIG_XML_THREAD_SAFE option is not compatible with CONFIG_XML_HEAP_BUFFERS. Disable one of those."
49
#endif
50
#define CONFIG_XML_THREAD_SAFE 1
51
#endif
/* CONFIG_XML_THREAD_SAFE */
52
53
/* Is the target library uses stack for internal
54
* buffers or heap. Stack require some RAM while heap
55
* can cut off performances.
56
* This option should not be activated.
57
* If unsure, set to 0
58
*/
59
#ifndef CONFIG_XML_HEAP_BUFFERS
60
#define CONFIG_XML_HEAP_BUFFERS 0
61
#endif
/* CONFIG_XML_HEAP_BUFFERS */
62
63
/* Define the size of internal buffer.
64
* For very small systems, large internal buffers
65
* can cause the systeml the behave strangely.
66
* This option should not be activated.
67
* If unsure, set to 0
68
*/
69
#ifndef CONFIG_XML_SMALL_BUFFER
70
#define CONFIG_XML_SMALL_BUFFER 0
71
#endif
/* CONFIG_XML_SMALL_BUFFER */
72
73
/* Limit the size of input XML libroxml can handle
74
* to 64kb instead of 4Gb.
75
* Setting this option will reduce the size of RAM loaded tree
76
* This option should not be activated.
77
* If unsure, set to 0
78
*/
79
#ifndef CONFIG_XML_SMALL_INPUT_FILE
80
#define CONFIG_XML_SMALL_INPUT_FILE 0
81
#endif
/* CONFIG_XML_SMALL_INPUT_FILE */
82
83
/*************** Implement HEAP/STACK BUFFERS **********************/
84
#if(CONFIG_XML_HEAP_BUFFERS==1)
85
#define ROXML_GET_BASE_BUFFER(name) char *name = malloc(ROXML_BASE_LEN)
86
#define ROXML_PUT_BASE_BUFFER(name) free(name)
87
#else
/* CONFIG_XML_HEAP_BUFFERS==0 */
88
#define ROXML_GET_BASE_BUFFER(name) char name[ROXML_BASE_LEN]
89
#define ROXML_PUT_BASE_BUFFER(name)
90
#endif
/* CONFIG_XML_HEAP_BUFFERS */
91
92
#endif
/* ROXML_TUNE_H */
Generated on Tue Jul 2 2024 21:08:20 for libroxml by
1.9.8