diff options
| author | Mike Pall <mike> | 2016-05-20 19:45:38 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2016-05-20 19:45:38 +0200 |
| commit | d4f3b1136b08ec65cf7e76691d63a7730d832ddc (patch) | |
| tree | 9b63b5cd209c008236c4684a5ea6483f69d8d6fe | |
| parent | 4fe400cfd5f0ae989f159228b6904fd8d1d78222 (diff) | |
| download | luajit-d4f3b1136b08ec65cf7e76691d63a7730d832ddc.tar.gz luajit-d4f3b1136b08ec65cf7e76691d63a7730d832ddc.tar.bz2 luajit-d4f3b1136b08ec65cf7e76691d63a7730d832ddc.zip | |
Workaround for MinGW headers lacking some exception definitions.
| -rw-r--r-- | src/lj_err.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_err.c b/src/lj_err.c index 1314c8db..600e6ee6 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
| @@ -439,7 +439,7 @@ VOID RtlUnwindEx_FIXED(PVOID,PVOID,PVOID,PVOID,PVOID,PVOID) asm("RtlUnwindEx"); | |||
| 439 | #define LJ_EXCODE_ERRCODE(cl) ((int)((cl) & 0xff)) | 439 | #define LJ_EXCODE_ERRCODE(cl) ((int)((cl) & 0xff)) |
| 440 | 440 | ||
| 441 | /* Windows exception handler for interpreter frame. */ | 441 | /* Windows exception handler for interpreter frame. */ |
| 442 | LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win(EXCEPTION_RECORD *rec, | 442 | LJ_FUNCA int lj_err_unwind_win(EXCEPTION_RECORD *rec, |
| 443 | void *f, CONTEXT *ctx, UndocumentedDispatcherContext *dispatch) | 443 | void *f, CONTEXT *ctx, UndocumentedDispatcherContext *dispatch) |
| 444 | { | 444 | { |
| 445 | #if LJ_TARGET_X64 | 445 | #if LJ_TARGET_X64 |
| @@ -464,7 +464,7 @@ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win(EXCEPTION_RECORD *rec, | |||
| 464 | setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); | 464 | setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); |
| 465 | } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) { | 465 | } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) { |
| 466 | /* Don't catch access violations etc. */ | 466 | /* Don't catch access violations etc. */ |
| 467 | return ExceptionContinueSearch; | 467 | return 1; /* ExceptionContinueSearch */ |
| 468 | } | 468 | } |
| 469 | #if LJ_TARGET_X64 | 469 | #if LJ_TARGET_X64 |
| 470 | /* Unwind the stack and call all handlers for all lower C frames | 470 | /* Unwind the stack and call all handlers for all lower C frames |
| @@ -490,7 +490,7 @@ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win(EXCEPTION_RECORD *rec, | |||
| 490 | #endif | 490 | #endif |
| 491 | } | 491 | } |
| 492 | } | 492 | } |
| 493 | return ExceptionContinueSearch; | 493 | return 1; /* ExceptionContinueSearch */ |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | /* Raise Windows exception. */ | 496 | /* Raise Windows exception. */ |
