Daniel Lehman : msvcp90: Set _Locimp vtable in _Locimp ctors (Valgrind).

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 26 07:11:54 CDT 2015


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

Author: Daniel Lehman <dlehman at esri.com>
Date:   Mon Jun 22 17:43:56 2015 -0700

msvcp90: Set _Locimp vtable in _Locimp ctors (Valgrind).

---

 dlls/msvcp90/locale.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index b975741..9b85322 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -9966,6 +9966,9 @@ istreambuf_iterator_char* __thiscall time_get_char_get_year(const time_get_char
     return call_time_get_char_do_get_year(this, ret, s, e, base, err, t);
 }
 
+/* ??_7_Locimp at locale@std@@6B@ */
+extern const vtable_ptr MSVCP_locale__Locimp_vtable;
+
 /* ??0_Locimp at locale@std@@AAE at _N@Z */
 /* ??0_Locimp at locale@std@@AEAA at _N@Z */
 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
@@ -9975,6 +9978,7 @@ locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this,
 
     memset(this, 0, sizeof(locale__Locimp));
     locale_facet_ctor_refs(&this->facet, 1);
+    this->facet.vtable = &MSVCP_locale__Locimp_vtable;
     this->transparent = transparent;
     locale_string_char_ctor_cstr(&this->name, "*");
     return this;
@@ -10001,6 +10005,7 @@ locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const
     _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
     memcpy(this, copy, sizeof(locale__Locimp));
     locale_facet_ctor_refs(&this->facet, 1);
+    this->facet.vtable = &MSVCP_locale__Locimp_vtable;
     if(copy->facetvec) {
         this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*));
         if(!this->facetvec) {
@@ -10560,11 +10565,6 @@ locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, categor
     return locimp;
 }
 
-/* ??_7_Locimp at locale@std@@6B@ */
-const vtable_ptr MSVCP_locale__Locimp_vtable[] = {
-    (vtable_ptr)THISCALL_NAME(locale__Locimp_vector_dtor)
-};
-
 /* ??0locale at std@@AAE at PAV_Locimp@01@@Z */
 /* ??0locale at std@@AEAA at PEAV_Locimp@01@@Z */
 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8)
@@ -11066,6 +11066,7 @@ size_t __cdecl wcsrtombs(char *dst, const wchar_t **pstr, size_t n, mbstate_t *s
 
 
 DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet at locale@std@@")
+DEFINE_RTTI_DATA1(locale__Locimp, 0, &locale_facet_rtti_base_descriptor, ".?AV_Locimp at locale@std@@")
 DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate at D@std@@")
 DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate at _W@std@@")
 DEFINE_RTTI_DATA1(collate_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate at G@std@@")
@@ -11102,6 +11103,13 @@ void __asm_dummy_vtables(void) {
             VTABLE_ADD_FUNC(locale_facet__Decref)
 #endif
             );
+    __ASM_VTABLE(locale__Locimp,
+            VTABLE_ADD_FUNC(locale__Locimp_vector_dtor)
+#if _MSVCP_VER >= 110
+            VTABLE_ADD_FUNC(locale_facet__Incref)
+            VTABLE_ADD_FUNC(locale_facet__Decref)
+#endif
+            );
     __ASM_VTABLE(collate_char,
             VTABLE_ADD_FUNC(collate_char_vector_dtor)
 #if _MSVCP_VER >= 110
@@ -11425,6 +11433,7 @@ void init_locale(void *base)
 {
 #ifdef __x86_64__
     init_locale_facet_rtti(base);
+    init_locale__Locimp_rtti(base);
     init_collate_char_rtti(base);
     init_collate_wchar_rtti(base);
     init_collate_short_rtti(base);




More information about the wine-cvs mailing list