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

Function acl_array_dbuf_create

lib_acl/src/stdlib/common/acl_array.c:165–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165ACL_ARRAY *acl_array_dbuf_create(int init_size, ACL_DBUF_POOL *dbuf)
166{
167 ACL_ARRAY *a;
168
169 if (dbuf != NULL) {
170 a = (ACL_ARRAY *) acl_dbuf_pool_calloc(dbuf,
171 sizeof(ACL_ARRAY));
172 a->dbuf = dbuf;
173 } else {
174 a = (ACL_ARRAY *) acl_mycalloc(1, sizeof(ACL_ARRAY));
175 a->dbuf = NULL;
176 }
177
178 a->push_back = array_push_back;
179 a->push_front = array_push_front;
180 a->pop_back = array_pop_back;
181 a->pop_front = array_pop_front;
182 a->iter_head = array_iter_head;
183 a->iter_next = array_iter_next;
184 a->iter_tail = array_iter_tail;
185 a->iter_prev = array_iter_prev;
186
187 if(init_size <= 0)
188 init_size = 100;
189
190 acl_array_pre_append(a, init_size);
191
192 return a;
193}
194
195void acl_array_clean(ACL_ARRAY *a, void (*free_fn)(void *))
196{

Callers 4

acl_array_createFunction · 0.85
acl_xml_node_allocFunction · 0.85
acl_xml3_node_allocFunction · 0.85
acl_xml2_node_allocFunction · 0.85

Calls 2

acl_dbuf_pool_callocFunction · 0.85
acl_array_pre_appendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…