From: Torge Matthies tmatthies@codeweavers.com
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- dlls/msvcrt/exception_ptr.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/dlls/msvcrt/exception_ptr.c b/dlls/msvcrt/exception_ptr.c index d4c427e436f..8238baec548 100644 --- a/dlls/msvcrt/exception_ptr.c +++ b/dlls/msvcrt/exception_ptr.c @@ -151,15 +151,9 @@ static inline void call_copy_ctor( void *func, void *this, void *src, int has_vb } #endif
-/********************************************************************* - * ?__ExceptionPtrCurrentException@@YAXPAX@Z - * ?__ExceptionPtrCurrentException@@YAXPEAX@Z - */ #ifndef __x86_64__ -void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep) +static void exception_ptr_from_record(exception_ptr *ep, EXCEPTION_RECORD *rec) { - EXCEPTION_RECORD *rec = msvcrt_get_thread_data()->exc_record; - TRACE("(%p)\n", ep);
if (!rec) @@ -202,10 +196,8 @@ void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep) return; } #else -void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep) +static void exception_ptr_from_record(exception_ptr *ep, EXCEPTION_RECORD *rec) { - EXCEPTION_RECORD *rec = msvcrt_get_thread_data()->exc_record; - TRACE("(%p)\n", ep);
if (!rec) @@ -250,6 +242,16 @@ void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep) } #endif
+/********************************************************************* + * ?__ExceptionPtrCurrentException@@YAXPAX@Z + * ?__ExceptionPtrCurrentException@@YAXPEAX@Z + */ +void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep) +{ + TRACE("(%p)\n", ep); + exception_ptr_from_record(ep, msvcrt_get_thread_data()->exc_record); +} + #if _MSVCR_VER >= 110 /********************************************************************* * ?__ExceptionPtrToBool@@YA_NPBX@Z