Lines Matching refs:freelist
220 addcleanup(void *ptr, freelist_t *freelist, destr_t destructor) in addcleanup() argument
224 index = freelist->first_available; in addcleanup()
225 freelist->first_available += 1; in addcleanup()
227 freelist->entries[index].item = ptr; in addcleanup()
228 freelist->entries[index].destructor = destructor; in addcleanup()
234 cleanreturn(int retval, freelist_t *freelist) in cleanreturn() argument
242 for (index = 0; index < freelist->first_available; ++index) { in cleanreturn()
243 freelist->entries[index].destructor(NULL, in cleanreturn()
244 freelist->entries[index].item); in cleanreturn()
247 if (freelist->entries_malloced) in cleanreturn()
248 PyMem_FREE(freelist->entries); in cleanreturn()
270 freelist_t freelist; in vgetargs1_impl() local
274 freelist.entries = static_entries; in vgetargs1_impl()
275 freelist.first_available = 0; in vgetargs1_impl()
276 freelist.entries_malloced = 0; in vgetargs1_impl()
331 freelist.entries = PyMem_NEW(freelistentry_t, max); in vgetargs1_impl()
332 if (freelist.entries == NULL) { in vgetargs1_impl()
336 freelist.entries_malloced = 1; in vgetargs1_impl()
347 return cleanreturn(0, &freelist); in vgetargs1_impl()
355 return cleanreturn(0, &freelist); in vgetargs1_impl()
358 msgbuf, sizeof(msgbuf), &freelist); in vgetargs1_impl()
360 return cleanreturn(1, &freelist); in vgetargs1_impl()
362 return cleanreturn(0, &freelist); in vgetargs1_impl()
367 return cleanreturn(0, &freelist); in vgetargs1_impl()
384 return cleanreturn(0, &freelist); in vgetargs1_impl()
392 sizeof(msgbuf), &freelist); in vgetargs1_impl()
395 return cleanreturn(0, &freelist); in vgetargs1_impl()
404 return cleanreturn(0, &freelist); in vgetargs1_impl()
407 return cleanreturn(1, &freelist); in vgetargs1_impl()
501 freelist_t *freelist) in converttuple() argument
567 msgbuf, bufsize, freelist); in converttuple()
585 int *levels, char *msgbuf, size_t bufsize, freelist_t *freelist) in convertitem() argument
593 bufsize, 0, freelist); in convertitem()
599 msgbuf, bufsize, freelist); in convertitem()
656 char *msgbuf, size_t bufsize, freelist_t *freelist) in convertsimple() argument
943 if (addcleanup(p, freelist, cleanup_buffer)) { in convertsimple()
988 if (addcleanup(p, freelist, cleanup_buffer)) { in convertsimple()
1195 if (addcleanup(*buffer, freelist, cleanup_ptr)) { in convertsimple()
1239 if (addcleanup(*buffer, freelist, cleanup_ptr)) { in convertsimple()
1303 addcleanup(addr, freelist, convert) == -1) in convertsimple()
1335 if (addcleanup(p, freelist, cleanup_buffer)) { in convertsimple()
1611 freelist_t freelist; in vgetargskeywords() local
1613 freelist.entries = static_entries; in vgetargskeywords()
1614 freelist.first_available = 0; in vgetargskeywords()
1615 freelist.entries_malloced = 0; in vgetargskeywords()
1643 return cleanreturn(0, &freelist); in vgetargskeywords()
1648 freelist.entries = PyMem_NEW(freelistentry_t, len); in vgetargskeywords()
1649 if (freelist.entries == NULL) { in vgetargskeywords()
1653 freelist.entries_malloced = 1; in vgetargskeywords()
1669 return cleanreturn(0, &freelist); in vgetargskeywords()
1678 return cleanreturn(0, &freelist); in vgetargskeywords()
1687 return cleanreturn(0, &freelist); in vgetargskeywords()
1694 return cleanreturn(0, &freelist); in vgetargskeywords()
1703 return cleanreturn(0, &freelist); in vgetargskeywords()
1727 return cleanreturn(0, &freelist); in vgetargskeywords()
1734 return cleanreturn(0, &freelist); in vgetargskeywords()
1751 levels, msgbuf, sizeof(msgbuf), &freelist); in vgetargskeywords()
1754 return cleanreturn(0, &freelist); in vgetargskeywords()
1775 return cleanreturn(0, &freelist); in vgetargskeywords()
1783 return cleanreturn(1, &freelist); in vgetargskeywords()
1793 return cleanreturn(0, &freelist); in vgetargskeywords()
1805 return cleanreturn(0, &freelist); in vgetargskeywords()
1812 return cleanreturn(0, &freelist); in vgetargskeywords()
1829 return cleanreturn(0, &freelist); in vgetargskeywords()
1839 return cleanreturn(0, &freelist); in vgetargskeywords()
1854 return cleanreturn(0, &freelist); in vgetargskeywords()
1859 return cleanreturn(1, &freelist); in vgetargskeywords()
2036 freelist_t freelist; in vgetargskeywordsfast_impl() local
2039 freelist.entries = static_entries; in vgetargskeywordsfast_impl()
2040 freelist.first_available = 0; in vgetargskeywordsfast_impl()
2041 freelist.entries_malloced = 0; in vgetargskeywordsfast_impl()
2066 freelist.entries = PyMem_NEW(freelistentry_t, len); in vgetargskeywordsfast_impl()
2067 if (freelist.entries == NULL) { in vgetargskeywordsfast_impl()
2071 freelist.entries_malloced = 1; in vgetargskeywordsfast_impl()
2095 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2112 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2141 levels, msgbuf, sizeof(msgbuf), &freelist); in vgetargskeywordsfast_impl()
2144 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2169 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2176 return cleanreturn(1, &freelist); in vgetargskeywordsfast_impl()
2201 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2222 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2234 return cleanreturn(0, &freelist); in vgetargskeywordsfast_impl()
2239 return cleanreturn(1, &freelist); in vgetargskeywordsfast_impl()