Alexandre Julliard : msvcrt: Unify _CxxThrowException implementation.
Module: wine Branch: master Commit: 6aa08b13e9db5c98d3e98f38d2cfac02e00253d2 URL: https://gitlab.winehq.org/wine/wine/-/commit/6aa08b13e9db5c98d3e98f38d2cfac0... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon May 20 16:36:18 2024 +0200 msvcrt: Unify _CxxThrowException implementation. --- dlls/msvcrt/cpp.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 08bed2d178c..c941be8fd36 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -887,28 +887,16 @@ void* CDECL __RTCastToVoid(void *cppobj) /********************************************************************* * _CxxThrowException (MSVCRT.@) */ -#ifndef __x86_64__ -void WINAPI _CxxThrowException( void *object, const cxx_exception_type *type ) -{ - ULONG_PTR args[3]; - - args[0] = CXX_FRAME_MAGIC_VC6; - args[1] = (ULONG_PTR)object; - args[2] = (ULONG_PTR)type; - RaiseException( CXX_EXCEPTION, EXCEPTION_NONCONTINUABLE, 3, args ); -} -#else void WINAPI _CxxThrowException( void *object, const cxx_exception_type *type ) { - ULONG_PTR args[4]; + ULONG_PTR args[CXX_EXCEPTION_PARAMS]; args[0] = CXX_FRAME_MAGIC_VC6; args[1] = (ULONG_PTR)object; args[2] = (ULONG_PTR)type; - RtlPcToFileHeader( (void*)type, (void**)&args[3]); - RaiseException( CXX_EXCEPTION, EXCEPTION_NONCONTINUABLE, 4, args ); + if (CXX_EXCEPTION_PARAMS == 4) args[3] = rtti_rva_base( type ); + RaiseException( CXX_EXCEPTION, EXCEPTION_NONCONTINUABLE, CXX_EXCEPTION_PARAMS, args ); } -#endif #if _MSVCR_VER >= 80
participants (1)
-
Alexandre Julliard