Fix mp_tuple_assert function
At the moment mp_tuple_assert()
function from src/box/tuple.h
seems to be incorrect:
static inline void
mp_tuple_assert(const char *tuple, const char *tuple_end)
{
assert(mp_typeof(*tuple) == MP_ARRAY);
#ifndef NDEBUG
mp_next(&tuple);
#endif
assert(tuple == tuple_end);
(void) tuple;
(void) tuple_end;
}
It seems that we need to keep mp_next
and assert(tuple == tuple_end)
under the same preprocessing:
static inline void
mp_tuple_assert(const char *tuple, const char *tuple_end)
{
assert(mp_typeof(*tuple) == MP_ARRAY);
#ifndef NDEBUG
mp_next(&tuple);
assert(tuple == tuple_end);
#endif
(void) tuple;
(void) tuple_end;
}
Everything should break on non-debug builds with assertions (we are lucky that we don't have such).