MCPcopy Create free account
hub / github.com/numpy/numpy / npy_unlink_coercion_cache

Function npy_unlink_coercion_cache

numpy/core/src/multiarray/array_coercion.c:649–662  ·  view source on GitHub ↗

* Unlink coercion cache item. * * @param current * @return next coercion cache object (or NULL) */

Source from the content-addressed store, hash-verified

647 * @return next coercion cache object (or NULL)
648 */
649NPY_NO_EXPORT coercion_cache_obj *
650npy_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
664NPY_NO_EXPORT void
665npy_free_coercion_cache(coercion_cache_obj *next) {

Callers 4

PyArray_FromAny_intFunction · 0.85
npy_free_coercion_cacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected