Piotr Caban : msvcp71: Added istrstream destructor implementation.

Alexandre Julliard julliard at winehq.org
Wed Oct 17 14:32:27 CDT 2012


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Oct 17 09:59:32 2012 +0200

msvcp71: Added istrstream destructor implementation.

---

 dlls/msvcp71/ios.c        |   28 ++++++++++++++++++++++++++++
 dlls/msvcp71/msvcp71.spec |    4 ++--
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcp71/ios.c b/dlls/msvcp71/ios.c
index b9af853..8c4e4dc 100644
--- a/dlls/msvcp71/ios.c
+++ b/dlls/msvcp71/ios.c
@@ -285,6 +285,14 @@ typedef struct {
 } ostrstream;
 
 typedef struct {
+    basic_istream_char base;
+    strstreambuf buf;
+    /* virtual inheritance
+     * basic_ios_char basic_ios;
+     */
+} istrstream;
+
+typedef struct {
     basic_iostream_char base;
     strstreambuf buf;
     /* virtual inheritance
@@ -486,6 +494,8 @@ extern const vtable_ptr MSVCP_strstreambuf_vtable;
 static const int ostrstream_vbtable[] = {0, sizeof(ostrstream)};
 extern const vtable_ptr MSVCP_ostrstream_vtable;
 
+static const int istrstream_vbtable[] = {0, sizeof(istrstream)};
+
 static const int strstream_vbtable1[] = {0, sizeof(strstream)};
 static const int strstream_vbtable2[] = {0, sizeof(strstream)-FIELD_OFFSET(strstream, base.base2)};
 extern const vtable_ptr MSVCP_strstream_vtable;
@@ -12473,6 +12483,24 @@ ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int
     return this;
 }
 
+static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
+{
+    return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
+}
+
+/* ??1istrstream at std@@UAE at XZ */
+/* ??1istrstream at std@@UEAA at XZ */
+DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
+void __thiscall istrstream_dtor(basic_ios_char *base)
+{
+    istrstream *this = istrstream_from_basic_ios(base);
+
+    TRACE("(%p)\n", this);
+
+    basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
+    strstreambuf_dtor(&this->buf);
+}
+
 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
 {
     return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
diff --git a/dlls/msvcp71/msvcp71.spec b/dlls/msvcp71/msvcp71.spec
index 726bfd8..26083b8 100644
--- a/dlls/msvcp71/msvcp71.spec
+++ b/dlls/msvcp71/msvcp71.spec
@@ -1197,8 +1197,8 @@
 @ cdecl -arch=win64 ??1facet at locale@std@@UEAA at XZ(ptr) locale_facet_dtor
 @ thiscall -arch=win32 ??1ios_base at std@@UAE at XZ(ptr) ios_base_dtor
 @ cdecl -arch=win64 ??1ios_base at std@@UEAA at XZ(ptr) ios_base_dtor
-@ stub -arch=win32 ??1istrstream at std@@UAE at XZ
-@ stub -arch=win64 ??1istrstream at std@@UEAA at XZ
+@ thiscall -arch=win32 ??1istrstream at std@@UAE at XZ(ptr) istrstream_dtor
+@ cdecl -arch=win64 ??1istrstream at std@@UEAA at XZ(ptr) istrstream_dtor
 @ thiscall -arch=win32 ??1locale at std@@QAE at XZ(ptr) locale_dtor
 @ cdecl -arch=win64 ??1locale at std@@QEAA at XZ(ptr) locale_dtor
 @ stub -arch=win32 ??1messages_base at std@@UAE at XZ




More information about the wine-cvs mailing list