Piotr Caban : ucrtbase: Fix __std_type_info_compare implementation.

Alexandre Julliard julliard at winehq.org
Thu Aug 4 17:20:18 CDT 2016


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Aug  4 16:28:18 2016 +0200

ucrtbase: Fix __std_type_info_compare implementation.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/cpp.c | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c
index b470478..8e44969 100644
--- a/dlls/msvcrt/cpp.c
+++ b/dlls/msvcrt/cpp.c
@@ -575,16 +575,6 @@ int __thiscall MSVCRT_type_info_before(type_info * _this, const type_info * rhs)
 }
 
 /******************************************************************
- *		__std_type_info_compare (MSVCRT.@)
- */
-int CDECL MSVCRT_type_info_compare(type_info * _this, const type_info * rhs)
-{
-    int ret = strcmp(_this->mangled + 1, rhs->mangled + 1);
-    TRACE("(%p %p) returning %d\n", _this, rhs, ret);
-    return ret;
-}
-
-/******************************************************************
  *		??1type_info@@UAE at XZ (MSVCRT.@)
  */
 DEFINE_THISCALL_WRAPPER(MSVCRT_type_info_dtor,4)
@@ -1513,3 +1503,24 @@ void* __cdecl __AdjustPointer(void *obj, const this_ptr_offsets *off)
 {
     return get_this_pointer(off, obj);
 }
+
+#if _MSVCR_VER >= 140
+typedef struct
+{
+    char *name;
+    char mangled[1];
+} type_info140;
+
+/******************************************************************
+ *		__std_type_info_compare (UCRTBASE.@)
+ */
+int CDECL MSVCRT_type_info_compare(const type_info140 *l, const type_info140 *r)
+{
+    int ret;
+
+    if (l == r) ret = 0;
+    else ret = strcmp(l->mangled + 1, r->mangled + 1);
+    TRACE("(%p %p) returning %d\n", l, r, ret);
+    return ret;
+}
+#endif




More information about the wine-cvs mailing list