Commit c306c527 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix _CxxThrowException prototype.

parent 3884a680
......@@ -484,5 +484,5 @@ typedef struct {
double imag;
} complex_double;
void WINAPI DECLSPEC_NORETURN _CxxThrowException(exception*,const cxx_exception_type*);
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
void __cdecl DECLSPEC_NORETURN _Xmem(void);
......@@ -1064,37 +1064,37 @@ void throw_exception(exception_type et, const char *str)
case EXCEPTION_LOGIC_ERROR: {
logic_error e;
MSVCP_logic_error_ctor(&e, name);
_CxxThrowException((exception*)&e, &logic_error_cxx_type);
_CxxThrowException(&e, &logic_error_cxx_type);
}
case EXCEPTION_LENGTH_ERROR: {
length_error e;
MSVCP_length_error_ctor(&e, name);
_CxxThrowException((exception*)&e, &length_error_cxx_type);
_CxxThrowException(&e, &length_error_cxx_type);
}
case EXCEPTION_OUT_OF_RANGE: {
out_of_range e;
MSVCP_out_of_range_ctor(&e, name);
_CxxThrowException((exception*)&e, &out_of_range_cxx_type);
_CxxThrowException(&e, &out_of_range_cxx_type);
}
case EXCEPTION_INVALID_ARGUMENT: {
invalid_argument e;
MSVCP_invalid_argument_ctor(&e, name);
_CxxThrowException((exception*)&e, &invalid_argument_cxx_type);
_CxxThrowException(&e, &invalid_argument_cxx_type);
}
case EXCEPTION_RUNTIME_ERROR: {
runtime_error e;
MSVCP_runtime_error_ctor(&e, name);
_CxxThrowException((exception*)&e, &runtime_error_cxx_type);
_CxxThrowException(&e, &runtime_error_cxx_type);
}
case EXCEPTION_FAILURE: {
failure e;
MSVCP_failure_ctor(&e, name);
_CxxThrowException((exception*)&e, &failure_cxx_type);
_CxxThrowException(&e, &failure_cxx_type);
}
case EXCEPTION_RANGE_ERROR: {
range_error e;
MSVCP_range_error_ctor(&e, name);
_CxxThrowException((exception*)&e, &range_error_cxx_type);
_CxxThrowException(&e, &range_error_cxx_type);
}
}
}
......
......@@ -663,5 +663,5 @@ static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, cons
#define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
#endif
void WINAPI DECLSPEC_NORETURN _CxxThrowException(exception*,const cxx_exception_type*);
void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
void __cdecl DECLSPEC_NORETURN _Xmem(void);
......@@ -620,7 +620,7 @@ static Context* get_current_context(void)
scheduler_resource_allocation_error e;
scheduler_resource_allocation_error_ctor_name(&e, NULL,
HRESULT_FROM_WIN32(GetLastError()));
_CxxThrowException(&e.e, &scheduler_resource_allocation_error_exception_type);
_CxxThrowException(&e, &scheduler_resource_allocation_error_exception_type);
}
if(InterlockedCompareExchange(&context_tls_index, tls_index, TLS_OUT_OF_INDEXES) != TLS_OUT_OF_INDEXES)
......
......@@ -755,7 +755,6 @@ const type_info* CDECL __RTtypeid(void *cppobj)
bad_typeid e;
bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" );
_CxxThrowException( &e, &bad_typeid_exception_type );
return NULL;
}
__TRY
......@@ -768,7 +767,6 @@ const type_info* CDECL __RTtypeid(void *cppobj)
__non_rtti_object e;
__non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" );
_CxxThrowException( &e, &__non_rtti_object_exception_type );
return NULL;
}
__ENDTRY
return ret;
......@@ -785,7 +783,6 @@ const type_info* CDECL __RTtypeid(void *cppobj)
bad_typeid e;
bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" );
_CxxThrowException( &e, &bad_typeid_exception_type );
return NULL;
}
__TRY
......@@ -805,7 +802,6 @@ const type_info* CDECL __RTtypeid(void *cppobj)
__non_rtti_object e;
__non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" );
_CxxThrowException( &e, &__non_rtti_object_exception_type );
return NULL;
}
__ENDTRY
return ret;
......@@ -892,7 +888,6 @@ void* CDECL __RTDynamicCast(void *cppobj, int unknown,
__non_rtti_object e;
__non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
_CxxThrowException( &e, &__non_rtti_object_exception_type );
return NULL;
}
__ENDTRY
return ret;
......@@ -955,7 +950,6 @@ void* CDECL __RTDynamicCast(void *cppobj, int unknown,
__non_rtti_object e;
__non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
_CxxThrowException( &e, &__non_rtti_object_exception_type );
return NULL;
}
__ENDTRY
return ret;
......@@ -995,7 +989,6 @@ void* CDECL __RTCastToVoid(void *cppobj)
__non_rtti_object e;
__non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
_CxxThrowException( &e, &__non_rtti_object_exception_type );
return NULL;
}
__ENDTRY
return ret;
......@@ -1006,7 +999,7 @@ void* CDECL __RTCastToVoid(void *cppobj)
* _CxxThrowException (MSVCRT.@)
*/
#ifndef __x86_64__
void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type )
void WINAPI _CxxThrowException( void *object, const cxx_exception_type *type )
{
ULONG_PTR args[3];
......@@ -1016,7 +1009,7 @@ void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *typ
RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args );
}
#else
void WINAPI _CxxThrowException( exception *object, const cxx_exception_type *type )
void WINAPI _CxxThrowException( void *object, const cxx_exception_type *type )
{
ULONG_PTR args[4];
......
......@@ -125,7 +125,7 @@ typedef struct
} cxx_exception_type;
#endif
void WINAPI _CxxThrowException(exception*,const cxx_exception_type*);
void WINAPI _CxxThrowException(void*,const cxx_exception_type*);
int CDECL _XcptFilter(NTSTATUS, PEXCEPTION_POINTERS);
static inline const char *dbgstr_type_info( const type_info *info )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment