Commit 16f6a567 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Add helpers for creating base class RTTI.

parent 84406584
......@@ -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 = { \
&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 = { \
{ \
......@@ -92,7 +95,7 @@ const rtti_object_locator name ## _rtti = { \
#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 = { \
&type_info_vtable, \
NULL, \
......@@ -104,7 +107,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