Suggested by Piotr Caban.
Signed-off-by: Arkadiusz Hiler ahiler@codeweavers.com --- dlls/msvcp90/cxx.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcp90/cxx.h b/dlls/msvcp90/cxx.h index 5052f433875..0c5b83f93f6 100644 --- a/dlls/msvcp90/cxx.h +++ b/dlls/msvcp90/cxx.h @@ -46,7 +46,7 @@
#ifndef __x86_64__
-#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#define DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ static type_info name ## _type_info = { \ &MSVCP_type_info_vtable, \ NULL, \ @@ -58,7 +58,10 @@ static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ base_classes_no, \ { 0, -1, 0}, \ 64 \ -}; \ +}; + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ \ static const rtti_base_array name ## _rtti_base_array = { \ { \ @@ -122,7 +125,7 @@ static const cxx_exception_type type ## _cxx_type = { \
#else
-#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ +#define __DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ static type_info name ## _type_info = { \ &MSVCP_type_info_vtable, \ NULL, \ @@ -134,7 +137,18 @@ static rtti_base_descriptor name ## _rtti_base_descriptor = { \ base_classes_no, \ { 0, -1, 0}, \ 64 \ -}; \ +}; + +#define DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ + __DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ + \ + static void init_ ## name ## _rtti(char *base) \ + { \ + name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ + } + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + __DEFINE_RTTI_BASE(name, base_classes_no, mangled_name) \ \ static rtti_base_array name ## _rtti_base_array = { \ { \