1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/**
* @file tree_schema_free.h
* @author Michal Vasko <mvasko@cesnet.cz>
* @brief internal freeing functions for YANG schema trees.
*
* Copyright (c) 2015 - 2024 CESNET, z.s.p.o.
*
* This source code is licensed under BSD 3-Clause License (the "License").
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*/
;
;
;
/**
* @brief Macro to free [sized array](@ref sizedarrays) of items using the provided free function. The ARRAY itself is also freed,
* but the memory is not sanitized.
*/
/**
* @brief Macro to free the specified MEMBER of a structure using the provided free function. The memory is not sanitized.
*/
/**
* @brief Macro to free [sized array](@ref sizedarrays) of strings stored in the context's dictionary. The ARRAY itself is also freed,
* but the memory is not sanitized.
*/
/**
* @brief Free a parsed qualified name.
*
* @param[in] ctx Context to use.
* @param[in] qname Qualified name to free.
*/
void ;
/**
* @brief Free the parsed extension instance structure.
*
* @param[in] ctx Context to use.
* @param[in] ext Parsed extension instance structure to free. Note that the instance itself is not freed.
*/
void ;
/**
* @brief Free a parsed restriction.
*
* @param[in] ctx Context to use.
* @param[in] restr Restriction to free.
*/
void ;
/**
* @brief Free the parsed type structure.
*
* @param[in] ctx Context to use.
* @param[in] type Parsed schema type structure to free. Note that the type itself is not freed.
*/
void ;
/**
* @brief Free the parsed when structure.
*
* @param[in] ctx Context to use.
* @param[in] when Parsed schema when structure to free. Note that the structure itself is not freed.
*/
void ;
/**
* @brief Free the parsed deviate structure.
*
* @param[in] ctx Context to use.
* @param[in] d Parsed schema deviate structure to free. Note that the structure itself is not freed.
*/
void ;
/**
* @brief Free the parsed deviation structure.
*
* @param[in] ctx Context to use.
* @param[in] dev Parsed schema deviation structure to free. Note that the structure itself is not freed.
*/
void ;
/**
* @brief Free a parsed node.
*
* @param[in] ctx Context to use.
* @param[in] node Node to free.
*/
void ;
/**
* @brief Free the parsed YANG schema tree structure. Works for both modules and submodules.
*
* @param[in] ctx Context to use.
* @param[in] module Parsed YANG schema tree structure to free.
*/
void ;
/**
* @brief Free the compiled extension instance structure.
*
* @param[in] ctx Context to use.
* @param[in] ext Compiled extension instance structure to be cleaned.
* Since the structure is typically part of the sized array, the structure itself is not freed.
*/
void ;
/**
* @brief Free the compiled if-feature structure.
*
* @param[in] ctx Context to use.
* @param[in] iff Compiled if-feature structure to be cleaned.
* Since the structure is typically part of the sized array, the structure itself is not freed.
*/
void ;
/**
* @brief Free the compiled range structure.
*
* @param[in] ctx Context to use.
* @param[in,out] range Compiled range structure to be freed.
* Since the structure is typically part of the sized array, the structure itself is not freed.
*/
void ;
/**
* @brief Free a compiled pattern.
*
* @param[in] ctx Context to use.
* @param[in] pattern Pointer to the pattern to free.
*/
void ;
/**
* @brief Free a bit/enum item.
*
* @param[in] ctx Context to use.
* @param[in] item Bit/enum item to free.
*/
void ;
/**
* @brief Free the compiled type structure.
*
* @param[in] ctx Context to use.
* @param[in] type Compiled type structure to be freed. The structure has refcount, so it is freed only in case
* the value is decreased to 0.
*/
void ;
/**
* @brief Free a compiled value.
*
* @param[in] ctx Context to use.
* @param[in] val Compiled value to free.
*/
void ;
/**
* @brief Free the compiled container node structure.
*
* Only the container-specific members are freed, for generic node free function,
* use ::lysc_node_free().
*
* @param[in] ctx Context to use.
* @param[in] node Compiled container node structure to be freed.
*/
void ;
/**
* @brief Free the compiled node structure.
*
* @param[in] ctx Context to use.
* @param[in] node Compiled node structure to be freed.
* @param[in] unlink Whether to first unlink the node before freeing.
*/
void ;
/**
* @brief Free the compiled schema structure.
*
* @param[in] ctx Context to use.
* @param[in] module Compiled schema module structure to free.
*/
void ;
/**
* @brief Free the schema structure. It just frees, it does not remove the schema from its context.
*
* @param[in] ctx Context to use.
* @param[in] module Schema module structure to free.
* @param[in] remove_links Whether to remove links in other modules to structures in this module. Not needed if
* the whole context is being freed.
*/
void ;
/**
* @brief Free lys parser context.
*
* @param[in] ctx Context to free.
*/
void ;
/**
* @brief Free yin parser context
*
* @param[in] ctx Context to free.
*/
void ;
/* LY_TREE_SCHEMA_FREE_H_ */