Jacek Caban : mshtml: Use return_nsstr helper in IHTMLDocument5:: get_compatMode.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 2 08:51:50 CST 2015
Module: wine
Branch: master
Commit: 25b4d6be68f84c9810c79e932e5f5543e373894f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=25b4d6be68f84c9810c79e932e5f5543e373894f
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Feb 27 17:31:48 2015 +0100
mshtml: Use return_nsstr helper in IHTMLDocument5::get_compatMode.
---
dlls/mshtml/htmldoc.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index a9ef3d9..977e2cb 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -2882,7 +2882,7 @@ static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
nsAString mode_str;
- const PRUnichar *mode;
+ nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
@@ -2892,13 +2892,8 @@ static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *
}
nsAString_Init(&mode_str, NULL);
- nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
-
- nsAString_GetData(&mode_str, &mode);
- *p = SysAllocString(mode);
- nsAString_Finish(&mode_str);
-
- return S_OK;
+ nsres = nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
+ return return_nsstr(nsres, &mode_str, p);
}
static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = {
More information about the wine-cvs
mailing list