builtin: fix definition of VectoredExceptionHandler (#6495)

pull/6489/head^2
Emily Hudson 2020-09-27 13:56:30 +01:00 committed by GitHub
parent 03258db26d
commit 3a869c726b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -199,15 +199,15 @@ pub:
context_record &ContextRecord
}
type VectoredExceptionHandler = fn(&ExceptionPointers)u32
type VectoredExceptionHandler = fn(&ExceptionPointers)int
fn C.AddVectoredExceptionHandler(u32, C.PVECTORED_EXCEPTION_HANDLER)
fn C.AddVectoredExceptionHandler(int, C.PVECTORED_EXCEPTION_HANDLER)
fn add_vectored_exception_handler(handler VectoredExceptionHandler) {
C.AddVectoredExceptionHandler(1, C.PVECTORED_EXCEPTION_HANDLER(handler))
}
[windows_stdcall]
fn unhandled_exception_handler(e &ExceptionPointers) u32 {
fn unhandled_exception_handler(e &ExceptionPointers) int {
match e.exception_record.code {
// These are 'used' by the backtrace printer
// so we dont want to catch them...