Piotr Caban : msvcp100: Add std::generic_category() implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Feb 25 10:56:04 CST 2016
Module: wine
Branch: master
Commit: ede38f4fdb457475708db0f2689f7ec5276c3f47
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ede38f4fdb457475708db0f2689f7ec5276c3f47
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Feb 25 10:47:47 2016 +0100
msvcp100: Add std::generic_category() implementation.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcp100/msvcp100.spec | 4 ++--
dlls/msvcp90/misc.c | 28 ++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp100/msvcp100.spec b/dlls/msvcp100/msvcp100.spec
index 62403d5..663a8f6 100644
--- a/dlls/msvcp100/msvcp100.spec
+++ b/dlls/msvcp100/msvcp100.spec
@@ -1742,8 +1742,8 @@
@ cdecl -arch=win64 ?gcount@?$basic_istream at GU?$char_traits at G@std@@@std@@QEBA_JXZ(ptr) basic_istream_wchar_gcount
@ thiscall -ret64 -arch=win32 ?gcount@?$basic_istream at _WU?$char_traits at _W@std@@@std@@QBE_JXZ(ptr) basic_istream_wchar_gcount
@ cdecl -arch=win64 ?gcount@?$basic_istream at _WU?$char_traits at _W@std@@@std@@QEBA_JXZ(ptr) basic_istream_wchar_gcount
-@ stub -arch=win32 ?generic_category at std@@YAABVerror_category at 1@XZ
-@ stub -arch=win64 ?generic_category at std@@YAAEBVerror_category at 1@XZ
+@ cdecl -arch=win32 ?generic_category at std@@YAABVerror_category at 1@XZ() std_generic_category
+@ cdecl -arch=win64 ?generic_category at std@@YAAEBVerror_category at 1@XZ() std_generic_category
@ thiscall -arch=win32 ?get@?$basic_istream at DU?$char_traits at D@std@@@std@@QAEAAV12 at AAD@Z(ptr ptr) basic_istream_char_get_ch
@ cdecl -arch=win64 ?get@?$basic_istream at DU?$char_traits at D@std@@@std@@QEAAAEAV12 at AEAD@Z(ptr ptr) basic_istream_char_get_ch
@ thiscall -arch=win32 ?get@?$basic_istream at DU?$char_traits at D@std@@@std@@QAEAAV12 at AAV?$basic_streambuf at DU?$char_traits at D@std@@@2@@Z(ptr ptr) basic_istream_char_get_streambuf
diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c
index 7ec4f19..a4713d2 100644
--- a/dlls/msvcp90/misc.c
+++ b/dlls/msvcp90/misc.c
@@ -736,6 +736,25 @@ const error_category* __cdecl std_system_category(void)
TRACE("()\n");
return &system_category.base;
}
+
+static custom_category generic_category;
+DEFINE_RTTI_DATA1(generic_category, 0, &error_category_rtti_base_descriptor, ".?AV_Generic_error_category at std@@")
+
+extern const vtable_ptr MSVCP_generic_category_vtable;
+
+static void generic_category_ctor(custom_category *this)
+{
+ this->base.vtable = &MSVCP_generic_category_vtable;
+ this->type = "generic";
+}
+
+/* ?generic_category at std@@YAABVerror_category at 1@XZ */
+/* ?generic_category at std@@YAAEBVerror_category at 1@XZ */
+const error_category* __cdecl std_generic_category(void)
+{
+ TRACE("()\n");
+ return &generic_category.base;
+}
#endif
#if _MSVCP_VER >= 110
@@ -1026,6 +1045,13 @@ void __asm_dummy_vtables(void) {
VTABLE_ADD_FUNC(custom_category_default_error_condition)
VTABLE_ADD_FUNC(custom_category_equivalent)
VTABLE_ADD_FUNC(custom_category_equivalent_code));
+ __ASM_VTABLE(generic_category,
+ VTABLE_ADD_FUNC(custom_category_vector_dtor)
+ VTABLE_ADD_FUNC(custom_category_name)
+ VTABLE_ADD_FUNC(custom_category_message)
+ VTABLE_ADD_FUNC(custom_category_default_error_condition)
+ VTABLE_ADD_FUNC(custom_category_equivalent)
+ VTABLE_ADD_FUNC(custom_category_equivalent_code));
#endif
#if _MSVCP_VER >= 110
__ASM_VTABLE(_Pad,
@@ -1042,6 +1068,7 @@ void init_misc(void *base)
init_error_category_rtti(base);
init_iostream_category_rtti(base);
init_system_category_rtti(base);
+ init_generic_category_rtti(base);
#endif
#if _MSVCP_VER >= 110
init__Pad_rtti(base);
@@ -1051,6 +1078,7 @@ void init_misc(void *base)
#if _MSVCP_VER == 100
iostream_category_ctor(&iostream_category);
system_category_ctor(&system_category);
+ generic_category_ctor(&generic_category);
#endif
}
More information about the wine-cvs
mailing list