[RFC] Replacement for "assert" in the libraries
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 13 Jun 2008 17:21:28 +0100
PROBLEM
The standard C assertion, typically used at the beginning of a function
assert(arg1 != NULL);
is an extremely useful self-checking tool for catching bugs, but in a C
Subversion's standard error reporting mechanism, which is mainly used
if (! arg1)
However, when written like this, it causes unnecessarily a decrease in
SOLUTION
A new macro:
SVN_ERR_ASSERT(arg1 != NULL);
which expands to something suitable, like the above code snippet,
Why does this seem too simple to be true?
Any volunteers to do it?
(Here's an improvement that can be made later: tweak the
- Julian
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.