No subject


Tue Aug 30 15:12:41 CDT 2005


|  ok(!PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "message %04x available\n", msg.message);

This is wrong because there is nothing that guarantees that the value of
msg.message is taken after the PeekMessage() call, clearly what is meant
to be. Actually on my system it is not, and wrong message numbers are
reported.

Since the problem is quite difficult to spot and likely to appear again
sometime, I have changed the ok() macro instead of fixing the callers.

Changelog:
	include/wine	: test.h
	Force a first evaluation of the "condition" argument of the "ok"
	macro so other arguments may depend on it.

Rein. 

----=_bkqds0lr2v5j8j71snotpfnujgo3h243eu.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii; name=ok.diff
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=ok.diff

--- 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_
 #define trace_(file, line)  (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
 
 #define ok     ok_(__FILE__, __LINE__)

----=_bkqds0lr2v5j8j71snotpfnujgo3h243eu.MFSBCHJLHS--



More information about the wine-patches mailing list