Commit 804f3235 authored by Nils Goroll's avatar Nils Goroll

make Tcheck a macro so assertions fail with more helpful __FILE__ and __LINE__

parent e5f5057f
......@@ -1095,14 +1095,11 @@ pdiff(const void *b, const void *e)
((unsigned)((const unsigned char *)e - (const unsigned char *)b));
}
static inline void
Tcheck(const txt t)
{
AN(t.b);
AN(t.e);
assert(t.b <= t.e);
}
#define Tcheck(t) do { \
AN((t).b); \
AN((t).e); \
assert((t).b <= (t).e); \
} while(0)
/*
* unsigned length of a txt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment