MCPcopy Create free account
hub / github.com/OpenPrinting/cups / cupsArrayDelete

Function cupsArrayDelete

cups/array.c:307–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305 */
306
307void
308cupsArrayDelete(cups_array_t *a) /* I - Array */
309{
310 /*
311 * Range check input...
312 */
313
314 if (!a)
315 return;
316
317 /*
318 * Free the elements if we have a free function (otherwise the caller is
319 * responsible for doing the dirty work...)
320 */
321
322 if (a->freefunc)
323 {
324 int i; /* Looping var */
325 void **e; /* Current element */
326
327 for (i = a->num_elements, e = a->elements; i > 0; i --, e ++)
328 (a->freefunc)(*e, a->data);
329 }
330
331 /*
332 * Free the array of element pointers...
333 */
334
335 if (a->alloc_elements)
336 free(a->elements);
337
338 if (a->hashsize)
339 free(a->hash);
340
341 free(a);
342}
343
344
345/*

Callers 15

do_testFunction · 0.85
with_distinct_valuesFunction · 0.85
delete_printerFunction · 0.85
finish_document_dataFunction · 0.85
finish_document_uriFunction · 0.85
ipp_create_jobFunction · 0.85
ipp_get_job_attributesFunction · 0.85
ipp_get_jobsFunction · 0.85
cupsdDeleteSubscriptionFunction · 0.85
mimeDeleteFunction · 0.85

Calls

no outgoing calls

Tested by 3

mainFunction · 0.68
type_dirFunction · 0.68
mainFunction · 0.68