Can you explain what's broken with the current usage? Maybe we can avoid it in the future / fix current usage bit by bit?
hyperion@svn.reactos.org schrieb:
Author: hyperion Date: Tue Jun 23 00:27:16 2009 New Revision: 41564
URL: http://svn.reactos.org/svn/reactos?rev=41564&view=rev Log: Don't want to fix all uses of PSEH2 macros, therefore have some curly braces, everyone
Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h
Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/p... ============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Tue Jun 23 00:27:16 2009 @@ -401,10 +401,10 @@
#include <excpt.h>
-#define _SEH2_TRY __try -#define _SEH2_FINALLY __finally -#define _SEH2_EXCEPT(...) __except(__VA_ARGS__) -#define _SEH2_END +#define _SEH2_TRY __try { +#define _SEH2_FINALLY } __finally { +#define _SEH2_EXCEPT(...) } __except(__VA_ARGS__) { +#define _SEH2_END }
#define _SEH2_GetExceptionInformation() (GetExceptionInformation()) #define _SEH2_GetExceptionCode() (GetExceptionCode())
Timo Kreuzer wrote:
Can you explain what's broken with the current usage? Maybe we can avoid it in the future / fix current usage bit by bit?
it's not that important. Sometimes in ReactOS we use:
_SEH2_TRY { } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) // note lack of braces here _SEH2_END;
which would be translated into:
__try { } __except(EXCEPTION_EXECUTE_HANDLER) ; // WTFBBQ?!!1!
If you or anyone else want to fix it, it's fine by me