blob: 633cf65bb29649aff9c9ba5219d123828984cd2f (
plain)
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
|
#include "../include/quickmedia/NodeSearch.h"
#include <stdlib.h>
void quickmedia_node_search_param_init(QuickMediaNodeSearchParam *self) {
self->name.data = NULL;
self->name.size = 0;
self->value.data = NULL;
self->value.size = 0;
self->defined = 0;
self->value_is_glob = 0;
self->index = -1;
}
static void quickmedia_node_search_param_deinit(QuickMediaNodeSearchParam *self) {
quickmedia_node_search_param_init(self);
}
void quickmedia_node_search_init(QuickMediaNodeSearch *self) {
self->name.data = NULL;
self->name.size = 0;
self->recursive = 0;
quickmedia_node_search_param_init(&self->param);
self->child = NULL;
}
void quickmedia_node_search_deinit(QuickMediaNodeSearch *self) {
self->name.data = NULL;
self->name.size = 0;
quickmedia_node_search_param_deinit(&self->param);
if(self->child) {
quickmedia_node_search_deinit(self->child);
free(self->child);
self->child = NULL;
}
}
|