From 5c8c46db181aa74371513bab157f7be1c712dfc3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 29 Dec 2011 13:49:36 +0100 Subject: [PATCH] mshtml: Reorder nsIURL functions to match vtbl order. --- dlls/mshtml/nsio.c | 102 ++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 251c4b2e0b3..4e31534ea00 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2174,57 +2174,6 @@ static nsresult NSAPI nsURI_SetPath(nsIURL *iface, const nsACString *aPath) return NS_OK; } -static nsresult NSAPI nsURL_GetRef(nsIURL *iface, nsACString *aRef) -{ - nsWineURI *This = impl_from_nsIURL(iface); - char *refa = NULL; - BSTR ref; - HRESULT hres; - - TRACE("(%p)->(%p)\n", This, aRef); - - if(!ensure_uri(This)) - return NS_ERROR_UNEXPECTED; - - hres = IUri_GetFragment(This->uri, &ref); - if(FAILED(hres)) - return NS_ERROR_UNEXPECTED; - - refa = heap_strdupWtoA(ref); - SysFreeString(ref); - if(ref && !refa) - return NS_ERROR_OUT_OF_MEMORY; - - nsACString_SetData(aRef, refa && *refa == '#' ? refa+1 : refa); - heap_free(refa); - return NS_OK; -} - -static nsresult NSAPI nsURL_SetRef(nsIURL *iface, const nsACString *aRef) -{ - nsWineURI *This = impl_from_nsIURL(iface); - const char *refa; - WCHAR *ref; - HRESULT hres; - - TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aRef)); - - if(!ensure_uri_builder(This)) - return NS_ERROR_UNEXPECTED; - - nsACString_GetData(aRef, &refa); - ref = heap_strdupAtoW(refa); - if(!ref) - return NS_ERROR_OUT_OF_MEMORY; - - hres = IUriBuilder_SetFragment(This->uri_builder, ref); - heap_free(ref); - if(FAILED(hres)) - return NS_ERROR_UNEXPECTED; - - return NS_OK; -} - static nsresult NSAPI nsURI_Equals(nsIURL *iface, nsIURI *other, PRBool *_retval) { nsWineURI *This = impl_from_nsIURL(iface); @@ -2386,6 +2335,57 @@ static nsresult NSAPI nsURI_GetOriginCharset(nsIURL *iface, nsACString *aOriginC return NS_ERROR_NOT_IMPLEMENTED; } +static nsresult NSAPI nsURL_GetRef(nsIURL *iface, nsACString *aRef) +{ + nsWineURI *This = impl_from_nsIURL(iface); + char *refa = NULL; + BSTR ref; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, aRef); + + if(!ensure_uri(This)) + return NS_ERROR_UNEXPECTED; + + hres = IUri_GetFragment(This->uri, &ref); + if(FAILED(hres)) + return NS_ERROR_UNEXPECTED; + + refa = heap_strdupWtoA(ref); + SysFreeString(ref); + if(ref && !refa) + return NS_ERROR_OUT_OF_MEMORY; + + nsACString_SetData(aRef, refa && *refa == '#' ? refa+1 : refa); + heap_free(refa); + return NS_OK; +} + +static nsresult NSAPI nsURL_SetRef(nsIURL *iface, const nsACString *aRef) +{ + nsWineURI *This = impl_from_nsIURL(iface); + const char *refa; + WCHAR *ref; + HRESULT hres; + + TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aRef)); + + if(!ensure_uri_builder(This)) + return NS_ERROR_UNEXPECTED; + + nsACString_GetData(aRef, &refa); + ref = heap_strdupAtoW(refa); + if(!ref) + return NS_ERROR_OUT_OF_MEMORY; + + hres = IUriBuilder_SetFragment(This->uri_builder, ref); + heap_free(ref); + if(FAILED(hres)) + return NS_ERROR_UNEXPECTED; + + return NS_OK; +} + static nsresult NSAPI nsURI_EqualsExceptRef(nsIURL *iface, nsIURI *other, PRBool *_retval) { nsWineURI *This = impl_from_nsIURL(iface);