def bswsa_should_halt(_seq, _stream, values, _context, _loaded_fields):
    """Halting function for :attr:`BasicStructWithSentinelArray.numbers`."""
    if values and values[-1] == 0:
        # Hit sentinel, remove it from the end of the array.
        del values[-1]
        return True
    return False