[vlc-devel] [PATCH] Tests for media list
Lukas Durfina
lukas.durfina at gmail.com
Fri Mar 28 23:27:07 CET 2008
On Fri, 28 Mar 2008 21:59:10 +0100, Pierre d'Herbemont
<pdherbemont at free.fr> wrote:
>
> On Mar 28, 2008, at 8:54 PM, Lukas Durfina wrote:
>> +/* test if we have exception */
>> +#define HAVE_EXCEPTION assert (libvlc_exception_raised (&ex)); \
>> + libvlc_exception_clear (&ex);
>> +
>> +
>
> Please avoid macro where possible. A static function should be
> perfectly fine here.
>
Yes, I know that, but if I use function, assert doesnt print
line number which shows, where the problem is. And inline
function doesnt solve this problem.
I can suggest this:
static void have_exception (int line)
{
if (!libvlc_exception_raised (&ex))
printf ("Problem on line: %d\n", line);
assert (libvlc_exception_raised (&ex));
libvlc_exception_clear (&ex);
}
and calling: have_exception (__LINE__);
ok?
Lukas
More information about the vlc-devel
mailing list