Piotr Caban : msvcp60: Manually define virtual destructors in vtables.
Alexandre Julliard
julliard at winehq.org
Fri Aug 17 10:37:47 CDT 2012
Module: wine
Branch: master
Commit: 819b94b869343e09f7d67f25bcdd9b0ae7d315b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=819b94b869343e09f7d67f25bcdd9b0ae7d315b5
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Aug 17 11:25:48 2012 +0200
msvcp60: Manually define virtual destructors in vtables.
---
dlls/msvcp60/cxx.h | 2 --
dlls/msvcp60/exception.c | 34 +++++++++-------------------------
2 files changed, 9 insertions(+), 27 deletions(-)
diff --git a/dlls/msvcp60/cxx.h b/dlls/msvcp60/cxx.h
index cc3915c..f709d12 100644
--- a/dlls/msvcp60/cxx.h
+++ b/dlls/msvcp60/cxx.h
@@ -48,7 +48,6 @@
"\t.quad " __ASM_NAME(#name "_rtti") "\n" \
"\t.globl " __ASM_NAME("MSVCP_" #name "_vtable") "\n" \
__ASM_NAME("MSVCP_" #name "_vtable") ":\n" \
- "\t.quad " THISCALL_NAME(MSVCP_ ## name ## _vector_dtor) "\n" \
funcs "\n\t.text")
#else
@@ -61,7 +60,6 @@
"\t.long " __ASM_NAME(#name "_rtti") "\n" \
"\t.globl " __ASM_NAME("MSVCP_" #name "_vtable") "\n" \
__ASM_NAME("MSVCP_" #name "_vtable") ":\n" \
- "\t.long " THISCALL_NAME(MSVCP_ ## name ## _vector_dtor) "\n" \
funcs "\n\t.text")
#endif /* _WIN64 */
diff --git a/dlls/msvcp60/exception.c b/dlls/msvcp60/exception.c
index e85463d..ec8dfcd 100644
--- a/dlls/msvcp60/exception.c
+++ b/dlls/msvcp60/exception.c
@@ -465,14 +465,6 @@ length_error* __thiscall MSVCP_length_error_ctor_bstr(length_error *this, const
return MSVCP_length_error_ctor(this, MSVCP_basic_string_char_c_str(str));
}
-DEFINE_THISCALL_WRAPPER(MSVCP_length_error_vector_dtor, 8)
-void* __thiscall MSVCP_length_error_vector_dtor(
- length_error *this, unsigned int flags)
-{
- TRACE("%p %x\n", this, flags);
- return MSVCP_logic_error_vector_dtor(this, flags);
-}
-
/* ??4length_error at std@@QAEAAV01 at ABV01@@Z */
/* ??4length_error at std@@QEAAAEAV01 at AEBV01@@Z */
DEFINE_THISCALL_WRAPPER(MSVCP_length_error_assign, 8)
@@ -542,14 +534,6 @@ out_of_range* __thiscall MSVCP_out_of_range_ctor_bstr(out_of_range *this, const
return MSVCP_out_of_range_ctor(this, MSVCP_basic_string_char_c_str(str));
}
-DEFINE_THISCALL_WRAPPER(MSVCP_out_of_range_vector_dtor, 8)
-void* __thiscall MSVCP_out_of_range_vector_dtor(
- out_of_range *this, unsigned int flags)
-{
- TRACE("%p %x\n", this, flags);
- return MSVCP_logic_error_vector_dtor(this, flags);
-}
-
/* ??4out_of_range at std@@QAEAAV01 at ABV01@@Z */
/* ??4out_of_range at std@@QEAAAEAV01 at AEBV01@@Z */
DEFINE_THISCALL_WRAPPER(MSVCP_out_of_range_assign, 8)
@@ -608,14 +592,6 @@ invalid_argument* __thiscall MSVCP_invalid_argument_copy_ctor(
return this;
}
-DEFINE_THISCALL_WRAPPER(MSVCP_invalid_argument_vector_dtor, 8)
-void* __thiscall MSVCP_invalid_argument_vector_dtor(
- invalid_argument *this, unsigned int flags)
-{
- TRACE("%p %x\n", this, flags);
- return MSVCP_logic_error_vector_dtor(this, flags);
-}
-
DEFINE_RTTI_DATA2(invalid_argument, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVinvalid_argument at std@@");
static const cxx_type_info invalid_argument_cxx_type_info = {
@@ -731,26 +707,34 @@ const char* __thiscall MSVCP_runtime_error_what(runtime_error *this)
#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
- __ASM_VTABLE(type_info,"");
+ __ASM_VTABLE(type_info,
+ VTABLE_ADD_FUNC(MSVCP_type_info_vector_dtor));
__ASM_VTABLE(exception,
+ VTABLE_ADD_FUNC(MSVCP_exception_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_exception_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
__ASM_VTABLE(bad_alloc,
+ VTABLE_ADD_FUNC(MSVCP_bad_alloc_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_exception_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
__ASM_VTABLE(logic_error,
+ VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_logic_error_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
__ASM_VTABLE(length_error,
+ VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_logic_error_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
__ASM_VTABLE(out_of_range,
+ VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_logic_error_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
__ASM_VTABLE(invalid_argument,
+ VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_logic_error_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
__ASM_VTABLE(runtime_error,
+ VTABLE_ADD_FUNC(MSVCP_runtime_error_vector_dtor)
VTABLE_ADD_FUNC(MSVCP_runtime_error_what)
VTABLE_ADD_FUNC(MSVCP_exception__Doraise));
#ifndef __GNUC__
More information about the wine-cvs
mailing list