From 145f6c14f2f7469f903594d3258b3287edd2b3e3 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 12 Sep 2011 13:10:58 +0200 Subject: [PATCH] msvcp90: Added basic_string::substr(size_t, size_t) implementation. --- dlls/msvcp90/msvcp90.spec | 8 ++++---- dlls/msvcp90/string.c | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index fc6cf20ad4b..66ec6a06a3a 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5496,12 +5496,12 @@ @ stub -arch=win64 ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ @ stub -arch=win32 ?str@strstreambuf@std@@QAEPADXZ @ stub -arch=win64 ?str@strstreambuf@std@@QEAAPEADXZ -@ stub -arch=win32 ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z -@ stub -arch=win64 ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z +@ thiscall -arch=win32 ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z(ptr ptr long long) MSVCP_basic_string_char_substr +@ cdecl -arch=win64 ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z(ptr ptr long long) MSVCP_basic_string_char_substr @ stub -arch=win32 ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z @ stub -arch=win64 ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z -@ stub -arch=win32 ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV12@II@Z -@ stub -arch=win64 ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV12@_K0@Z +@ thiscall -arch=win32 ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV12@II@Z(ptr ptr long long) MSVCP_basic_string_wchar_substr +@ cdecl -arch=win64 ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV12@_K0@Z(ptr ptr long long) MSVCP_basic_string_wchar_substr @ thiscall -arch=win32 ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ(ptr) basic_streambuf_char_sungetc @ cdecl -arch=win64 ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ(ptr) basic_streambuf_char_sungetc @ stub -arch=win32 ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index 1d153310a78..2ad568c0198 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -847,6 +847,19 @@ void __thiscall MSVCP_basic_string_char_swap(basic_string_char *this, basic_stri } } +/* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */ +/* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */ +DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_char_substr, 12) +basic_string_char __thiscall MSVCP_basic_string_char_substr( + basic_string_char *this, MSVCP_size_t off, MSVCP_size_t len) +{ + basic_string_char ret = { 0 }; + TRACE("%p %lu %lu\n", this, off, len); + + MSVCP_basic_string_char_ctor_substr(&ret, this, off, len); + return ret; +} + /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */ /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16) @@ -1700,6 +1713,19 @@ void __thiscall MSVCP_basic_string_wchar_swap(basic_string_wchar *this, basic_st } } +/* ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV12@II@Z */ +/* ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV12@_K0@Z */ +DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_wchar_substr, 12) +basic_string_wchar __thiscall MSVCP_basic_string_wchar_substr( + basic_string_wchar *this, MSVCP_size_t off, MSVCP_size_t len) +{ + basic_string_wchar ret = { 0 }; + TRACE("%p %lu %lu\n", this, off, len); + + MSVCP_basic_string_wchar_ctor_substr(&ret, this, off, len); + return ret; +} + /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */ /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16) -- 2.11.4.GIT