Piotr Caban : msvcp90: Use DEFINE_RTTI_DATA to define locale_facet RTTI base descriptor.

Alexandre Julliard julliard at winehq.org
Tue Mar 27 12:48:07 CDT 2012


Module: wine
Branch: master
Commit: 1328da18151f83b98b84d0fa1e70f79d08450a83
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1328da18151f83b98b84d0fa1e70f79d08450a83

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Mar 27 12:41:05 2012 +0200

msvcp90: Use DEFINE_RTTI_DATA to define locale_facet RTTI base descriptor.

---

 dlls/msvcp90/locale.c |   23 +++++------------------
 1 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index f667d91..d2e7798 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -182,9 +182,7 @@ locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsi
     return this;
 }
 
-const vtable_ptr MSVCP_locale_facet_vtable[] = {
-    (vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor)
-};
+extern const vtable_ptr MSVCP_locale_facet_vtable;
 
 /* ??0id at locale@std@@QAE at I@Z */
 /* ??0id at locale@std@@QEAA at _K@Z */
@@ -240,7 +238,7 @@ DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
 locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
 {
     TRACE("(%p)\n", this);
-    this->vtable = MSVCP_locale_facet_vtable;
+    this->vtable = &MSVCP_locale_facet_vtable;
     this->refs = 0;
     return this;
 }
@@ -251,7 +249,7 @@ DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
 locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
 {
     TRACE("(%p %lu)\n", this, refs);
-    this->vtable = MSVCP_locale_facet_vtable;
+    this->vtable = &MSVCP_locale_facet_vtable;
     this->refs = refs;
     return this;
 }
@@ -666,12 +664,6 @@ _Timevec*__thiscall _Locinfo__Gettnames(const _Locinfo *this, _Timevec *ret)
     return ret;
 }
 
-static const type_info locale_facet_type_info = {
-    MSVCP_locale_facet_vtable,
-    NULL,
-    ".?AVfacet at locale@std@@"
-};
-
 /* ?id@?$collate at D@std@@2V0locale at 2@A */
 locale_id collate_char_id = {0};
 
@@ -4127,13 +4119,7 @@ basic_string_char* __thiscall locale_name(const locale *this, basic_string_char
     return ret;
 }
 
-static const rtti_base_descriptor locale_facet_rtti_base_descriptor = {
-    &locale_facet_type_info,
-    0,
-    { 0, -1, 0},
-    64
-};
-
+DEFINE_RTTI_DATA(locale_facet, 0, 0, NULL, NULL, NULL, ".?AVfacet at locale@std@@");
 DEFINE_RTTI_DATA(collate_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate at D@std@@");
 DEFINE_RTTI_DATA(collate_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate at _W@std@@");
 DEFINE_RTTI_DATA(collate_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate at G@std@@");
@@ -4151,6 +4137,7 @@ DEFINE_RTTI_DATA(num_get_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL,
 #ifndef __GNUC__
 void __asm_dummy_vtables(void) {
 #endif
+    __ASM_VTABLE(locale_facet, "");
     __ASM_VTABLE(collate_char,
             VTABLE_ADD_FUNC(collate_char_do_compare)
             VTABLE_ADD_FUNC(collate_char_do_transform)




More information about the wine-cvs mailing list