test.h: problem with ok's argument evaluation order

Alexandre Julliard julliard at winehq.org
Wed Dec 22 08:22:06 CST 2004


Rein Klazes <wijn at wanadoo.nl> writes:

> --- wine/include/wine/test.h	2004-05-04 08:10:39.000000000 +0200
> +++ mywine/include/wine/test.h	2004-12-20 15:29:39.000000000 +0100
> @@ -53,7 +53,8 @@ extern void winetest_trace( const char *
>  
>  #endif /* __GNUC__ */
>  
> -#define ok_(file, line)     (winetest_set_location(file, line), 0) ? 0 : winetest_ok
> +#define winetest_ok_(cond, args...) (cond) ? winetest_ok(TRUE, args) : winetest_ok(FALSE, args)
> +#define ok_(file, line)     (winetest_set_location(file, line), 0) ? 0 : winetest_ok_

Unfortunately varargs macros are not portable.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list