Revisiting exceptions

Mike Hearn mh at codeweavers.com
Thu May 5 16:22:16 CDT 2005


Hi Alexandre,

I got bored and took a stab at doing proper SEH macros using some GCC
extensions I found. These are rather rough, unfinished definitions, and
they aren't tested at all but do they look OK?

thanks -mike


static void __wine_frame_cleanup( __WINE_FRAME *wineframe )
{
    __wine_pop_frame(&wineframe->frame);
}

#define __TRY                                                           \
    {                                                                   \
        __label__ __frame_label;                                        \
        __WINE_FRAME __f __attribute__((cleanup(__wine_frame_cleanup))); \
        if (0) {                                                        \
        __frame_label:


            
#define __EXCEPT(func)                                        \
        }                                                     \
        else {                                                \
            __f.frame.Handler = __wine_exception_handler;     \
            __f.u.filter = (func);                            \
            __wine_push_frame( &__f.frame );                  \
            goto __frame_label;                               \
        }                                                     \
    }





More information about the wine-devel mailing list