MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_json_node_alloc

Function acl_json_node_alloc

lib_acl/src/json/acl_json.c:86–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86ACL_JSON_NODE *acl_json_node_alloc(ACL_JSON *json)
87{
88 ACL_JSON_NODE *node;
89
90 node = (ACL_JSON_NODE*) acl_dbuf_pool_alloc(
91 json->dbuf, sizeof(ACL_JSON_NODE));
92
93 acl_ring_init(&node->children);
94 acl_ring_init(&node->node);
95
96 node->ltag = acl_vstring_dbuf_alloc(json->dbuf, 16);
97 node->text = acl_vstring_dbuf_alloc(json->dbuf, 16);
98 node->tag_node = NULL;
99 node->parent = NULL;
100 node->type = 0;
101 node->depth = 0;
102 node->quote = 0;
103 node->left_ch = 0;
104 node->right_ch = 0;
105 node->unicode_state = 0; // Same as ACL_JSON_U_NONE defined in acl_json_parse.c
106 node->unicode_digits = 0;
107 node->unicode_value = 0;
108 node->unicode_high = 0;
109 node->backslash = 0;
110 node->part_word = 0;
111 node->disabled = 0;
112 node->json = json;
113
114 node->iter_head = node_iter_head;
115 node->iter_next = node_iter_next;
116 node->iter_tail = node_iter_tail;
117 node->iter_prev = node_iter_prev;
118
119 json->node_cnt++;
120 return node;
121}
122
123int acl_json_node_delete(ACL_JSON_NODE *node)
124{

Callers 15

json_objFunction · 0.85
json_memberFunction · 0.85
json_arrayFunction · 0.85
json_elementFunction · 0.85
acl_json_create_textFunction · 0.85
acl_json_create_boolFunction · 0.85
acl_json_create_nullFunction · 0.85
acl_json_create_int64Function · 0.85
acl_json_create_doubleFunction · 0.85
acl_json_create_double2Function · 0.85

Calls 3

acl_dbuf_pool_allocFunction · 0.85
acl_ring_initFunction · 0.85
acl_vstring_dbuf_allocFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…