diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2007-04-16 23:15:03 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2007-04-16 23:15:03 +0000 |
commit | b46c4dd535002ab37987168c3d99823442377692 (patch) | |
tree | 9077b546cb2aefce1fd2b531fb12033af00c1ab3 /epan | |
parent | d0a793c3537d4ede21f34fea7e1aebf175c33284 (diff) |
revert back to 20437
svn path=/trunk/; revision=21451
Diffstat (limited to 'epan')
-rw-r--r-- | epan/exceptions.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/epan/exceptions.h b/epan/exceptions.h index 100a0fb151..52abdfd7c7 100644 --- a/epan/exceptions.h +++ b/epan/exceptions.h @@ -1,6 +1,8 @@ #ifndef __EXCEPTIONS_H__ #define __EXCEPTIONS_H__ +/* $Id $ */ + #ifndef XCEPT_H #include "except.h" #endif @@ -74,7 +76,6 @@ #define OutOfMemoryError 6 - /* Usage: * * TRY { @@ -172,17 +173,7 @@ * RETHROW, and don't reenter FINALLY if a * different exception is thrown */ -#ifdef _MSC_VER -#define WINTRY __try { -#define WINENDTRY_BEGIN } __finally { -#define WINENDTRY_END } -#else -#define WINTRY -#define WINENDTRY_BEGIN -#define WINENDTRY_END -#endif - -#define TRY /**/\ +#define TRY \ {\ except_t *exc; \ volatile int except_state = 0; \ @@ -195,17 +186,15 @@ except_state &= ~EXCEPT_CAUGHT; \ \ if (except_state == 0 && exc == 0) \ - WINTRY /* user's code goes here */ - + /* user's code goes here */ #define ENDTRY \ - WINENDTRY_BEGIN /* rethrow the exception if necessary */ \ + /* rethrow the exception if necessary */ \ if(!(except_state&EXCEPT_CAUGHT) && exc != 0) \ except_rethrow(exc); \ - except_try_pop(); WINENDTRY_END\ + except_try_pop();\ } - /* the (except_state |= EXCEPT_CAUGHT) in the below is a way of setting * except_state before the user's code, without disrupting the user's code if * it's a one-liner. |