* Unlink coercion cache item. * * @param current * @return next coercion cache object (or NULL) */
| 647 | * @return next coercion cache object (or NULL) |
| 648 | */ |
| 649 | NPY_NO_EXPORT coercion_cache_obj * |
| 650 | npy_unlink_coercion_cache(coercion_cache_obj *current) |
| 651 | { |
| 652 | coercion_cache_obj *next = current->next; |
| 653 | Py_DECREF(current->arr_or_sequence); |
| 654 | if (_coercion_cache_num < COERCION_CACHE_CACHE_SIZE) { |
| 655 | _coercion_cache_cache[_coercion_cache_num] = current; |
| 656 | _coercion_cache_num++; |
| 657 | } |
| 658 | else { |
| 659 | PyMem_Free(current); |
| 660 | } |
| 661 | return next; |
| 662 | } |
| 663 | |
| 664 | NPY_NO_EXPORT void |
| 665 | npy_free_coercion_cache(coercion_cache_obj *next) { |
no outgoing calls
no test coverage detected