Skip to content

Commit

Permalink
Workaround for MinGW headers lacking some exception definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Pall committed May 20, 2016
1 parent 4fe400c commit d4f3b11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lj_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ VOID RtlUnwindEx_FIXED(PVOID,PVOID,PVOID,PVOID,PVOID,PVOID) asm("RtlUnwindEx");
#define LJ_EXCODE_ERRCODE(cl) ((int)((cl) & 0xff))

/* Windows exception handler for interpreter frame. */
LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win(EXCEPTION_RECORD *rec,
LJ_FUNCA int lj_err_unwind_win(EXCEPTION_RECORD *rec,
void *f, CONTEXT *ctx, UndocumentedDispatcherContext *dispatch)
{
#if LJ_TARGET_X64
Expand All @@ -464,7 +464,7 @@ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win(EXCEPTION_RECORD *rec,
setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP));
} else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) {
/* Don't catch access violations etc. */
return ExceptionContinueSearch;
return 1; /* ExceptionContinueSearch */
}
#if LJ_TARGET_X64
/* Unwind the stack and call all handlers for all lower C frames
Expand All @@ -490,7 +490,7 @@ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win(EXCEPTION_RECORD *rec,
#endif
}
}
return ExceptionContinueSearch;
return 1; /* ExceptionContinueSearch */
}

/* Raise Windows exception. */
Expand Down

0 comments on commit d4f3b11

Please sign in to comment.