Piotr Caban : msvcp110: Fix _Ctypevec structure layout.
Alexandre Julliard
julliard at winehq.org
Tue Jan 14 13:45:00 CST 2014
Module: wine
Branch: master
Commit: d5b72bbcdc1484f16c73d489fabb32ddfa95beac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d5b72bbcdc1484f16c73d489fabb32ddfa95beac
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Jan 14 13:56:17 2014 +0100
msvcp110: Fix _Ctypevec structure layout.
---
dlls/msvcp90/locale.c | 11 +++++++++++
dlls/msvcp90/msvcp90.h | 5 +++++
2 files changed, 16 insertions(+)
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index 1b0c891..02ccb0e 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -631,7 +631,12 @@ _Ctypevec* __cdecl _Getctype(_Ctypevec *ret)
TRACE("\n");
ret->page = ___lc_codepage_func();
+#if _MSVCP_VER < 110
ret->handle = ___lc_handle_func()[LC_COLLATE];
+#else
+ /* FIXME: use ___lc_locale_name_func() */
+ ret->name = NULL;
+#endif
ret->delfl = TRUE;
table = malloc(sizeof(short[256]));
if(!table) throw_exception(EXCEPTION_BAD_ALLOC, NULL);
@@ -1446,6 +1451,9 @@ void __thiscall ctype_char__Tidy(ctype_char *this)
if(this->ctype.delfl)
free((short*)this->ctype.table);
+#if _MSVCP_VER >= 110
+ free(this->ctype.name);
+#endif
}
/* ?classic_table@?$ctype at D@std@@KAPBFXZ */
@@ -2142,6 +2150,9 @@ void __thiscall ctype_wchar_dtor(ctype_wchar *this)
TRACE("(%p)\n", this);
if(this->ctype.delfl)
free((void*)this->ctype.table);
+#if _MSVCP_VER >= 110
+ free(this->ctype.name);
+#endif
}
DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor, 8)
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h
index 67ea924..f5e79f5 100644
--- a/dlls/msvcp90/msvcp90.h
+++ b/dlls/msvcp90/msvcp90.h
@@ -123,10 +123,15 @@ typedef enum {
} codecvt_base_result;
typedef struct {
+#if _MSVCP_VER < 110
LCID handle;
+#endif
unsigned page;
const short *table;
int delfl;
+#if _MSVCP_VER >= 110
+ wchar_t *name;
+#endif
} _Ctypevec;
/* class codecvt_base */
More information about the wine-cvs
mailing list