Commit f3f948a5 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler Committed by Alexandre Julliard

msvcp90: Add helpers for creating base class RTTI.

Suggested by Piotr Caban. Signed-off-by: 's avatarArkadiusz Hiler <ahiler@codeweavers.com> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6568a8cb
......@@ -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 = { \
{ \
......
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