• Home
  • Raw
  • Download

Lines Matching refs:item

51   _cups_sp_item_t	*item,		/* String pool item */  in _cupsStrAlloc()  local
84 if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL) in _cupsStrAlloc()
90 item->ref_count ++; in _cupsStrAlloc()
94 "ref_count=%d", item, item->str, s, item->guard, in _cupsStrAlloc()
95 item->ref_count)); in _cupsStrAlloc()
97 if (item->guard != _CUPS_STR_GUARD) in _cupsStrAlloc()
103 return (item->str); in _cupsStrAlloc()
111 item = (_cups_sp_item_t *)calloc(1, sizeof(_cups_sp_item_t) + slen); in _cupsStrAlloc()
112 if (!item) in _cupsStrAlloc()
119 item->ref_count = 1; in _cupsStrAlloc()
120 memcpy(item->str, s, slen + 1); in _cupsStrAlloc()
123 item->guard = _CUPS_STR_GUARD; in _cupsStrAlloc()
126 "ref_count=%d", item, item->str, s, item->guard, in _cupsStrAlloc()
127 item->ref_count)); in _cupsStrAlloc()
134 cupsArrayAdd(stringpool, item); in _cupsStrAlloc()
138 return (item->str); in _cupsStrAlloc()
182 _cups_sp_item_t *item; /* Current item */ in _cupsStrFlush() local
190 for (item = (_cups_sp_item_t *)cupsArrayFirst(stringpool); in _cupsStrFlush()
191 item; in _cupsStrFlush()
192 item = (_cups_sp_item_t *)cupsArrayNext(stringpool)) in _cupsStrFlush()
193 free(item); in _cupsStrFlush()
289 _cups_sp_item_t *item, /* String pool item */ in _cupsStrFree() local
328 if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL && in _cupsStrFree()
329 item == key) in _cupsStrFree()
335 item->ref_count --; in _cupsStrFree()
337 if (!item->ref_count) in _cupsStrFree()
343 cupsArrayRemove(stringpool, item); in _cupsStrFree()
345 free(item); in _cupsStrFree()
364 _cups_sp_item_t *item; /* Pointer to string pool item */ in _cupsStrRetain() local
369 item = (_cups_sp_item_t *)(s - offsetof(_cups_sp_item_t, str)); in _cupsStrRetain()
372 if (item->guard != _CUPS_STR_GUARD) in _cupsStrRetain()
375 "ref_count=%d", item, s, item->guard, item->ref_count)); in _cupsStrRetain()
382 item->ref_count ++; in _cupsStrRetain()
541 _cups_sp_item_t *item; /* Current item */ in _cupsStrStatistics() local
551 item = (_cups_sp_item_t *)cupsArrayFirst(stringpool); in _cupsStrStatistics()
552 item; in _cupsStrStatistics()
553 item = (_cups_sp_item_t *)cupsArrayNext(stringpool)) in _cupsStrStatistics()
559 count += item->ref_count; in _cupsStrStatistics()
560 len = (strlen(item->str) + 8) & (size_t)~7; in _cupsStrStatistics()
562 tbytes += item->ref_count * len; in _cupsStrStatistics()