Repository: numpy/numpy
File: numpy/_core/src/multiarray/ctors.c (C)

Code before:
                 * rightly confuses you.)
                 */
                char *item;
                item = (PyArray_BYTES(self) + i * PyArray_STRIDES(self)[0]);
                if (PyArray_Pack(PyArray_DESCR(self), item, item_pyvalue) < 0) {
                    err = 1;
                    goto finish_critical_section;
                }
                /* If this was an array(-like) we still need to unlike int: */
                if (*cache != NULL && (*cache)->converted_obj == item_pyvalue) {
                    *cache = npy_unlink_coercion_cache(*cache);
                }
            }
            else {
                PyArrayObject *view;
                view = (PyArrayObject *)array_item_asarray(self, i);
                if (view == NULL) {
                    err = 1;
                    goto finish_critical_section;
                }
                if (PyArray_AssignFromCache_Recursive(view, ndim, cache) < 0) {
                    Py_DECREF(view);
                    err = 1;
                    goto finish_critical_section;
                }
                Py_DECREF(view);
            }
        }
      finish_critical_section:;

        NPY_END_CRITICAL_SECTION_SEQUENCE_FAST();
        if (err) {
            goto finish;
        }


    }
    ret = 0;

  finish:;
    Py_XDECREF(item_pyvalue);
    Py_DECREF(obj);
    return ret;
}


/**
 * Fills an item based on a coercion cache object. It consumes the cache
 * object while doing so.
 *
 * @param self Array to fill.

Review comment (suggestion):
```suggestion
    err = 0;
      finish_critical_section:;
```

Code after:
                 */
                char *item;
                item = (PyArray_BYTES(self) + i * PyArray_STRIDES(self)[0]);
                if (PyArray_Pack(PyArray_DESCR(self), item, item_pyvalue) < 0) {
                    goto finish_critical_section;
                }
                /* If this was an array(-like) we still need to unlike int: */
                if (*cache != NULL && (*cache)->converted_obj == item_pyvalue) {
                    *cache = npy_unlink_coercion_cache(*cache);
                }
            }
            else {
                PyArrayObject *view;
                view = (PyArrayObject *)array_item_asarray(self, i);
                if (view == NULL) {
                    goto finish_critical_section;
                }
                if (PyArray_AssignFromCache_Recursive(view, ndim, cache) < 0) {
                    Py_DECREF(view);
                    goto finish_critical_section;
                }
                Py_DECREF(view);
            }
        }
    err = 0;
      finish_critical_section:;

        NPY_END_CRITICAL_SECTION_SEQUENCE_FAST();
        if (err) {
            goto finish;
        }

    }
    ret = 0;

  finish:;
    Py_XDECREF(item_pyvalue);
    Py_DECREF(obj);
    return ret;
}


/**
 * Fills an item based on a coercion cache object. It consumes the cache
 * object while doing so.
 *
 * @param self Array to fill.
 * @param cache coercion_cache_object, will be consumed. The cache must not
 *        contain a single array (must start with a sequence). The array case
 *        should be handled by `PyArray_FromArray()` before.
 * @return 0 on success -1 on failure.