Alexandre Julliard : msvcp60: Share memory functions implementation with msvcp90.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 12 10:48:18 CDT 2015


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Mar 12 16:14:27 2015 +0900

msvcp60: Share memory functions implementation with msvcp90.

---

 dlls/msvcp60/Makefile.in |  1 +
 dlls/msvcp60/memory.c    | 86 ------------------------------------------------
 dlls/msvcp60/msvcp.h     | 12 +++----
 3 files changed, 7 insertions(+), 92 deletions(-)

diff --git a/dlls/msvcp60/Makefile.in b/dlls/msvcp60/Makefile.in
index fcd149b..2a3e726 100644
--- a/dlls/msvcp60/Makefile.in
+++ b/dlls/msvcp60/Makefile.in
@@ -3,6 +3,7 @@ IMPORTS   = msvcrt
 EXTRADEFS = -D_MSVCP_VER=60
 PARENTSRC = ../msvcp90
 
+
 C_SRCS = \
 	exception.c \
 	ios.c \
diff --git a/dlls/msvcp60/memory.c b/dlls/msvcp60/memory.c
deleted file mode 100644
index fc2a0b4..0000000
--- a/dlls/msvcp60/memory.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2010 Piotr Caban for CodeWeavers
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "config.h"
-
-#include <stdarg.h>
-#include <limits.h>
-
-#include "msvcp.h"
-
-#include "windef.h"
-#include "winbase.h"
-
-
-/* ?deallocate@?$allocator at D@std@@QAEXPADI at Z */
-/* ?deallocate@?$allocator at D@std@@QEAAXPEAD_K at Z */
-void MSVCP_allocator_char_deallocate(void *this, char *ptr, MSVCP_size_t size)
-{
-    MSVCRT_operator_delete(ptr);
-}
-
-/* ?allocate@?$allocator at D@std@@QAEPADI at Z */
-/* ?allocate@?$allocator at D@std@@QEAAPEAD_K at Z */
-char* MSVCP_allocator_char_allocate(void *this, MSVCP_size_t count)
-{
-    return MSVCRT_operator_new(count);
-}
-
-/* ?max_size@?$allocator at D@std@@QBEIXZ */
-/* ?max_size@?$allocator at D@std@@QEBA_KXZ */
-MSVCP_size_t MSVCP_allocator_char_max_size(void *this)
-{
-    return UINT_MAX/sizeof(char);
-}
-
-
-/* allocator<wchar_t> */
-/* ?deallocate@?$allocator at _W@std@@QAEXPA_WI at Z */
-/* ?deallocate@?$allocator at _W@std@@QEAAXPEA_W_K at Z */
-void MSVCP_allocator_wchar_deallocate(void *this,
-        wchar_t *ptr, MSVCP_size_t size)
-{
-    MSVCRT_operator_delete(ptr);
-}
-
-/* ?allocate@?$allocator at _W@std@@QAEPA_WI at Z */
-/* ?allocate@?$allocator at _W@std@@QEAAPEA_W_K at Z */
-wchar_t* MSVCP_allocator_wchar_allocate(void *this, MSVCP_size_t count)
-{
-    if(UINT_MAX/count < sizeof(wchar_t)) {
-        throw_exception(EXCEPTION_BAD_ALLOC, NULL);
-        return NULL;
-    }
-
-    return MSVCRT_operator_new(count * sizeof(wchar_t));
-}
-
-/* ?max_size@?$allocator at _W@std@@QBEIXZ */
-/* ?max_size@?$allocator at _W@std@@QEBA_KXZ */
-MSVCP_size_t MSVCP_allocator_wchar_max_size(void *this)
-{
-    return UINT_MAX/sizeof(wchar_t);
-}
-
-/* ??4?$allocator at X@std@@QAEAAV01 at ABV01@@Z */
-/* ??4?$allocator at X@std@@QEAAAEAV01 at AEBV01@@Z */
-DEFINE_THISCALL_WRAPPER(MSVCP_allocator_void_assign, 8)
-void* __thiscall MSVCP_allocator_void_assign(void *this, void *assign)
-{
-    return this;
-}
diff --git a/dlls/msvcp60/msvcp.h b/dlls/msvcp60/msvcp.h
index 0a8c57c..7974479 100644
--- a/dlls/msvcp60/msvcp.h
+++ b/dlls/msvcp60/msvcp.h
@@ -70,12 +70,12 @@ void basic_string_wchar_clear(basic_string_wchar*);
 basic_string_wchar* __thiscall basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
 MSVCP_size_t __thiscall basic_string_wchar_length(const basic_string_wchar*);
 
-char* MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
-void MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
-MSVCP_size_t MSVCP_allocator_char_max_size(void*);
-wchar_t* MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
-void MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
-MSVCP_size_t MSVCP_allocator_wchar_max_size(void*);
+char* __thiscall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
+void __thiscall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
+MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void*);
+wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
+void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
+MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
 
 /* class locale::facet */
 typedef struct {




More information about the wine-cvs mailing list