Piotr Caban : msvcp90: Added basic_string::max_size implementation.
Alexandre Julliard
julliard at winehq.org
Fri Oct 14 14:14:48 CDT 2011
Module: wine
Branch: master
Commit: 72fb8e2c654b398a970c7ee19883faa763a393b9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=72fb8e2c654b398a970c7ee19883faa763a393b9
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Oct 14 15:01:22 2011 +0200
msvcp90: Added basic_string::max_size implementation.
---
dlls/msvcp90/msvcp90.h | 2 ++
dlls/msvcp90/msvcp90.spec | 8 ++++----
dlls/msvcp90/string.c | 18 ++++++++++++++++++
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h
index 0639a67..1365223 100644
--- a/dlls/msvcp90/msvcp90.h
+++ b/dlls/msvcp90/msvcp90.h
@@ -187,8 +187,10 @@ typedef struct _basic_string_wchar
char* __stdcall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
void __stdcall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
+MSVCP_size_t __stdcall MSVCP_allocator_char_max_size(void*);
wchar_t* __stdcall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
void __stdcall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
+MSVCP_size_t __stdcall MSVCP_allocator_wchar_max_size(void*);
/* class locale */
typedef struct
diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec
index 078762f..11271cf 100644
--- a/dlls/msvcp90/msvcp90.spec
+++ b/dlls/msvcp90/msvcp90.spec
@@ -4515,12 +4515,12 @@
@ cdecl -arch=win64 ?max_size@?$allocator at G@std@@QEBA_KXZ(ptr) MSVCP_allocator_short_max_size
@ thiscall -arch=win32 ?max_size@?$allocator at _W@std@@QBEIXZ(ptr) MSVCP_allocator_wchar_max_size
@ cdecl -arch=win64 ?max_size@?$allocator at _W@std@@QEBA_KXZ(ptr) MSVCP_allocator_wchar_max_size
-@ stub -arch=win32 ?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEIXZ
-@ stub -arch=win64 ?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QEBA_KXZ
+@ thiscall -arch=win32 ?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEIXZ(ptr) basic_string_char_max_size
+@ cdecl -arch=win64 ?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QEBA_KXZ(ptr) basic_string_char_max_size
@ stub -arch=win32 ?max_size@?$basic_string at GU?$char_traits at G@std@@V?$allocator at G@2@@std@@QBEIXZ
@ stub -arch=win64 ?max_size@?$basic_string at GU?$char_traits at G@std@@V?$allocator at G@2@@std@@QEBA_KXZ
-@ stub -arch=win32 ?max_size@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QBEIXZ
-@ stub -arch=win64 ?max_size@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QEBA_KXZ
+@ thiscall -arch=win32 ?max_size@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QBEIXZ(ptr) basic_string_wchar_max_size
+@ cdecl -arch=win64 ?max_size@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QEBA_KXZ(ptr) basic_string_wchar_max_size
@ cdecl ?min@?$numeric_limits at C@std@@SACXZ() std_numeric_limits_signed_char_min
@ cdecl ?min@?$numeric_limits at D@std@@SADXZ() std_numeric_limits_char_min
@ cdecl ?min@?$numeric_limits at E@std@@SAEXZ() std_numeric_limits_unsigned_char_min
diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c
index 529eb02..1f2bf7d 100644
--- a/dlls/msvcp90/string.c
+++ b/dlls/msvcp90/string.c
@@ -999,6 +999,15 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_length(basic_string_char *this)
return this->size;
}
+/* ?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEIXZ */
+/* ?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QEBA_KXZ */
+DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
+MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
+{
+ TRACE("%p\n", this);
+ return MSVCP_allocator_char_max_size(this->allocator)-1;
+}
+
/* ?empty@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBE_NXZ */
/* ?empty@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QEBA_NXZ */
DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_empty, 4)
@@ -2440,6 +2449,15 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(basic_string_wchar *this
return this->size;
}
+/* ?max_size@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QBEIXZ */
+/* ?max_size@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QEBA_KXZ */
+DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
+MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
+{
+ TRACE("%p\n", this);
+ return MSVCP_allocator_wchar_max_size(this->allocator)-1;
+}
+
/* ?empty@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QBE_NXZ */
/* ?empty@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@QEBA_NXZ */
DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_empty, 4)
More information about the wine-cvs
mailing list