1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 15:30:29 -08:00
emacs/mps/code/mpsw3.h
Richard Brooksby c0bb4cd3cd Removing hopenames from the master sources.
This change will be integrated but ignored (-ay) to the gg-epcore/union sources, so that they retain HopeNames.

Copied from Perforce
 Change: 24911
 ServerID: perforce.ravenbrook.com
2001-12-07 13:19:25 +00:00

39 lines
933 B
C

/* impl.h.mpsw3: RAVENBROOK MEMORY POOL SYSTEM C INTERFACE, WINDOWS PART
*
* $Id$
* Copyright (c) 2001 Ravenbrook Limited.
*
* .readership: customers, MPS developers.
* .sources: design.mps.interface.c.
*/
#ifndef mpsw3_h
#define mpsw3_h
#include "mps.h" /* needed for mps_tramp_t */
#include "mpswin.h" /* needed for SEH filter */
extern LONG mps_SEH_filter(LPEXCEPTION_POINTERS, void **, size_t *);
extern void mps_SEH_handler(void *, size_t);
#undef mps_tramp /* Override generic version */
#define mps_tramp(r_o, f, p, s) \
MPS_BEGIN \
void **_r_o = (r_o); \
mps_tramp_t _f = (f); \
void *_p = (p); \
size_t _s = (s); \
void *_hp = NULL; size_t _hs = 0; \
__try { \
*_r_o = (*_f)(_p, _s); \
} __except(mps_SEH_filter(GetExceptionInformation(), \
&_hp, &_hs)) { \
mps_SEH_handler(_hp, _hs); \
} \
MPS_END
#endif /* mpsw3_h */