[vlc-devel] [PATCH] Tests for media list

Pierre d'Herbemont pdherbemont at free.fr
Fri Mar 28 23:33:02 CET 2008


On Mar 28, 2008, at 11:27 PM, Lukas Durfina wrote:
> 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.

Nice catch.

I'll do:

assert(have_exception());

or

#define have_exception(a) __have_exception(a,__FILE__,__LINE__)

Pick up the one you prefer.

Pierre.



More information about the vlc-devel mailing list